We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

kirantara's avatar
kirantara
Explorer | Level 3
6 years ago

Error In Uploading a file

Hello Experts 

I am New To Dropbox Api And Today i was trying to uplaod a file from api but got error .  

 

Unknown API function: "files/upload \\eHiSS5jxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

i am using Http api  and my code is 

 

function main()
local oHTTP,cJSON,url
setmode(25,80)

ctoken := "<REDACTED>"

url := "https://content.dropboxapi.com/2/files/upload \" + ctoken
cJSON := '{"c:\tmp\pdf\CKF1907319.pdf","mode": "add","autorename": true,"mute": false,"strict_conflict": false,}'
URL
? cjson
wt = inkey(0)

oHTTP := CREATEOBJECT('Msxml2.ServerXMLHTTP.6.0')
oHTTP:OPEN("POST", url , .F.)
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
wt = inkey(0)
return  

 

Please me to solve this issue

 

Vikram

11 Replies

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 2 hours ago
411 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!