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

feltj16's avatar
feltj16
Explorer | Level 4
3 years ago

Lookup Failed Error from Finish Batch

Hi I am using the below endpoints to upload files in the backend.   https://content.dropboxapi.com/2/files/upload_session/start After getting the session id, I run all on the finish batch endpoint...
  • Greg-DB's avatar
    3 years ago

    feltj16 For reference, an "upload session" is a way to upload a large file by doing so in pieces. That is, each individual request would only contain one portion of the file. The "offset" of an upload session indicates how much of the file has been uploaded so far. (Also, if you only need to upload small file(s), you can just use /2/files/upload instead.)

     

    An "incorrect_offset" error like that indicates that the app specified the wrong offset value, based on how much of the file the Dropbox API has received for that particular upload session so far.

     

    For example, the error you shared in your first post indicates that the call failed because Dropbox had received 14 bytes for that upload session so far, but the app made a call where it supplied an offset other than 14.

     

    Each upload session call should contain the binary data for the portion of the file that you want to upload, with the correct corresponding offset value.

     

    And as Здравко, we do recommend using the official Dropbox JavaScript SDK if possible. That has corresponding methods for the HTTP endpoints, such as for upload sessions (as well as for the single small file upload). There are also examples of using the SDK to upload files, such as this simple example for uploading a small file from Node, as well as this more complex browser JavaScript example for upload small or large files.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API

Make connections with other developers

795 PostsLatest Activity: 2 days ago
194 Following

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 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!