Discuss Dropbox Developer & API
I am using the Javascript API to upload my files in dropbox on my website. The files are getting uploaded properly, but I am unable to display the progress of the upload. I have to wait for a longer time on the page for bigger files till the File Uploaded text gets displayed.
The Dropbox API v2 JavaScript SDK does not offer a way to check the progress on a transfer unfortunately, e.g., for filesUpload. I'll pass this along as a feature request to the team but I can't promise if or when that might be implemented.
If you're using "upload sessions" though, where you upload files in pieces, you can keep track of how much you've uploaded between each piece:
If you're not already using that, it may be a significant amount or work to switch to it and implement your progress tracking.
@Greg-DB Thank you for the response. Currently, I am using the filesUpload function. Can you please share link for a working example of fileUploadSession.
We have an example of using upload sessions in the JavaScript SDK here: https://github.com/dropbox/dropbox-sdk-js/blob/b2353edeb221ec17b8e70a1d8fd4799e2f1f031d/examples/jav...
@Greg-DB Yes, I am using the same example, but there is no progress bar code in the example.
Yes, that is just an example of using the upload sessions methods themselves. It doesn't have a progress bar implemented, so you'd need to implement it in your code and hook up your own progress bar. For example, between each filesUploadSessionStart/filesUploadSessionAppendV2/filesUploadSessionFinish call, you could update the state of your progress bar based on the current 'offset' value.
Hi there!
If you need more help you can view your support options (expected response time for a 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!