You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
MatthiD
18 days agoNew member | Level 2
Upload multiple files in session
Backstory I have a bunch of small PDFs (18 kb each). filesUpload worked until I understood that a `429` is quite usual. Researched and found the batch endpoints. I wanted to use `/upload_session...
DB-Des
18 days agoDropbox Engineer
Hi MatthiD
You can definitely just start an upload session and then finish it, without needing to use `filesUploadSessionAppendV2`.
Looking at the code snippet provided, it looks like you are starting an upload session by calling `filesUploadSessionStart()`, but are attempting to finish that same session by calling `filesUploadSessionFinishBatchV2()`. While this technically does work — `filesUploadSessionFinishBatchV2()` will finish an upload session started with `filesUploadSessionStart()` — you may want to use one of the following combinations:
- `filesUploadSessionStart()` and `filesUploadSessionFinish()`
- `filesUploadSessionStartBatch()` and `filesUploadSessionFinishBatchV2()`
Keep in mind that `filesUploadSessionStart()` is meant to upload a single file, whereas `filesUploadSessionStartBatch()` starts a batch of upload sessions.
Additionally, since there is no functionality to separate the files, please ensure you are not combining all of the file data of multiple files into one large buffer — use one upload session per file needing to be uploaded.
To answer your additional questions:
- An upload session is a temporary process that allows large files to be uploaded in smaller chunks instead of a single request.
- An entry is information pertaining to a file in the batch of files.
- Could you clarify what you are wanting to achieve by "accessing one session from multiple entries"?
Lastly, the error you are receiving means:
The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error.
The "correct_offset" value from the response you provided means that the Dropbox API had only received 257523 bytes for the upload session so far. The error "incorrect_offset" was thrown because the Dropbox API received a value other than 257523 in your request.
Feel free to take a look at this example for an idea of how an upload session can be handled.
For best practices when uploading files via the Dropbox API, please refer to our Performance Guide.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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!