We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
zainulabd786
7 years agoExplorer | Level 3
How to know the offset for filesUploadSessionFinishBatch()
Hi, I am trying to upload many files using the JavaScript SDK's
filesUploadSessionFinishBatch(),
For that, I am looping through all the files and calling
filesUploadSessionStart() for ...
Greg-DB
Dropbox Community Moderator
7 years agoYou should keep track of the offset client-side, while uploading the data, so that you can specify the value when sending the next piece of the file, or when finishing the file. There's a sample implementation here.
It looks like your usage is a little different though, in that you're not using filesUploadSessionAppendV2. It sounds like your files are small enough that you can upload all of the data with a single call to filesUploadSessionStart each. In this case, that means that your "offset" would just be the length of the file data.
About Discuss Dropbox Developer & API
Make connections with other developers
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, Facebook or Instagram.
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!