Sir
Then Please i am sorry to say that i am not able to upload the pdf file to dropbox abc FOlder please me help me to do this make changes in code which is attached here
File to Upload Email.pdf
upload to drop in folder abc folder with file name email.pdf
where to mention and how to arttach in code please change the code where necessary
**----------------------------
function main()
**----------------------------
Local oHttp, cJSON, urlUpload
setmode(25,80)
cToken := "eHiSS5jXq0AAAAAAAAAAduAlRf3zXxxxxxxxxxxxxxxxxxxxx"
urlUpload := "https://content.dropboxapi.com/2/files/upload"
// cJSON := '{c:\tmp\pdf\CKF1907319.pdf, "mode": "add","autorename": true,"mute": false,"strict_conflict": false,}'
cJson := hb_memoread("demo.hbp")
// cPath := "/HomeWork/demo.txt"
cPath := "/PMCSURAT/demo.txt"
oHttp := CREATEOBJECT('Msxml2.ServerXMLHTTP.6.0')
oHttp:OPEN("POST", urlUpload , .F.)
oHttp:setRequestHeader( "Authorization", "Bearer " + cToken )
oHttp:setRequestHeader( "Dropbox-API-Arg", '{ "path": "' + cPath + '", "mode" : "overwrite" }' )
oHttp:setRequestHeader( "Content-type", "application/octet-stream" )
oHttp:SEND(cJSON)
IF oHttp:status != 200
? oHttp:responseText
hb_memowrit("response.txt",oHttp:responseText)
? "Error"
ELSE
? oHttp:responseText
hb_memowrit("response.txt",oHttp:responseText)
ENDIF
?
wait
// wt = inkey(0)
Return
Thank you & reagards
Vikram