Forum Discussion

SmartPhoneLover's avatar
SmartPhoneLover
Explorer | Level 3
7 years ago

Upload/Download files via shell (Android-Linux)

Hi all,

I'm looking for upload and download files from an Application folder I have created on my account (with token). -> e.g. = Applications > app_name > Private > file.xxx

 

The code I will use on shell will be:

curl -X POST https://content.dropboxapi.com/2/files/upload \
    --header "Authorization: Bearer ACCESS_TOKEN" \
    --header "Dropbox-API-Arg: {\"path\": \"/Private/file.xxx\"}" \
    --header "Content-Type: application/octet-stream"

 

Quesitons:

· Is the above code correct? Does it requiere more things to be added/modified?

· What should I add to the code to pick a specific file from x location to be uploaded? (e.g. = want to upload temp.txt file from /sdcard/Download/folder1/*)

· How may have this code to be modified to allow getting back that file, from my Dropxbox account, to my device again. (download file) [I think that replacing '...2/files/upload' by '.../download' will be enought]

 

Thanks.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,946 PostsLatest Activity: 7 seconds ago
351 Following

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!