cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know more about how Community ideas impact Dropbox development? Check it out here

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File transfer API

File transfer API

hrh747
Helpful | Level 5

Hi,

I started to become familiar with the Dropbox API (Python). I am looking for the API that will transfer a file from my Windows 10 machine to my Dropbox account. Looking at this sample code on the Dropbox website to backup a file:

with open(LOCALFILE, 'rb') as f:
# We use WriteMode=overwrite to make sure that the settings in the file
# are changed on upload
print("Uploading " + LOCALFILE + " to Dropbox as " + BACKUPPATH + "...")
try:
dbx.files_upload(f.read(), BACKUPPATH, mode=WriteMode('overwrite'))
except ApiError as err:
...........

Is there another API that does file transfer, or this is how the file transfer is carried out by reading bytes from the source and writing to the destination (Just want to make sure I am not missing something)?

 

Thanks in advance

1 Accepted Solution

Accepted Solutions

Re: File transfer API

Greg-DB
Dropboxer

The files_upload method is the right way to use the Dropbox API via the Python SDK to send some file data to the Dropbox servers and save it as a file in the connected Dropbox account. (Note that it only supports files up to 150 MB in size; for larger files, use upload sessions.)

View solution in original post

2 Replies 2

Re: File transfer API

Greg-DB
Dropboxer

The files_upload method is the right way to use the Dropbox API via the Python SDK to send some file data to the Dropbox servers and save it as a file in the connected Dropbox account. (Note that it only supports files up to 150 MB in size; for larger files, use upload sessions.)

View solution in original post

Re: File transfer API

hrh747
Helpful | Level 5

Thanks for your confirmation.

Who's talking

Top contributors to this post

  • User avatar
    hrh747 Helpful | Level 5
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?