Reputation: 59664
I am using Dropbox client for Python (actually a Python 3 version, but I don't think it matters now) to upload some files to my Dropbox. I am also using PyQt4 to have a GUI for this.
Is there a possibility to specify a callback to be called when the file is uploaded to show the user the upload progress?
Upvotes: 0
Views: 245
Reputation: 8421
You mean, you want to show progress while the file is uploading (on a progressbar or something)?
You probably need get_chunked_uploader()
From API Docs:
DESCRIPTION Uploads large files to Dropbox in multiple chunks. Also has the ability to resume if the upload is interrupted. This allows for uploads larger than the /files_put maximum of 150 MB.
Typical usage:
1) Send a PUT request to /chunked_upload with the first chunk of the file without setting upload_id, and receive an upload_id in return.
2)Repeatedly PUT subsequent chunks using the upload_id to identify the upload in progress and an offset representing the number of bytes transferred so far.
3)After each chunk has been uploaded, the server returns a new offset representing the total amount transferred.
...
Upvotes: 1