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
Colaman
2 years agoNew member | Level 2
Dropbox upload file lookup_failed/incorrect_offset/
I use the upload_session/append_v2 to upload file , but it return error when i call /upload_session/finish to save file.
I think offset should be the file length? "/upload_session/finish ' response like that
{
"error_summary": "lookup_failed/incorrect_offset/.",
"error": {
".tag": "lookup_failed",
"lookup_failed": {
".tag": "incorrect_offset",
"correct_offset": 86736
}
}
}
The file length is 86601 , 86736 is the content-length in request header. I set the Content-Length: 86601in the body.
- Greg-DBDropbox Staff
A 'lookup_failed/incorrect_offset' error like this indicates that the "offset" parameter value you supplied for the upload session in the API call does not match what the server currently expects for that upload session. The "offset" value is the amount of data (in bytes) that has been uploaded so far for that upload session. The "offset" should be the file length if you've completed uploading all of the file data.
Upload sessions work by having the app upload the file in pieces, across multiple requests. Each request, whether to /2/files/upload_session/start, /2/files/upload_session/append_v2, or /2/files/upload_session/finish, can contain just a piece of the file. The "Content-Length" request header for any given request should indicate the size of the piece of data being sent in that particular request only.
There's an example here, written for the Dropbox JavaScript SDK, that may serve as a useful example of how the logic works for splitting the file and setting the offset.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,885 PostsLatest Activity: 5 years 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!