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
DrunkenMoose
4 years agoExplorer | Level 3
Dropbox upload session append - incorrect offset
Hey, I'm working on a dropbox upload function in java (coldfusion). The simpel upload works perfectly, but I'm having troubles with the session upload. Here is what I try to do: >I have an im...
Greg-DB
Dropbox Staff
If the first /2/files/upload_session/append_v2 call is failing with 'incorrect_offset', and indicating a 'correct_offset' of 8024827 for that upload session, then that indicates that the API received that much data for that upload session in the /2/files/upload_session/start call. That is, the 'correct_offset' value indicates how much data the API has received so far for that upload session. If this number is higher than expected, it's likely that your code is accidentally sending more data per call than you intended.
I recommend debugging your code for calling /2/files/upload_session/start to make sure you're only sending as much data as you intended, i.e., "4194304 KB" in this case, from your description. (By the way, did you mean bytes instead of KB? 4 MB = 4194304 bytes, not KB.)
Also, it makes sense that it would work if you use a chunk size of 150 MB for a 20 MB file, since you would be uploading the entire file in the /2/files/upload_session/start call, and so wouldn't need to use /2/files/upload_session/append_v2, so the offset value doesn't need to be checked.
DrunkenMoose
4 years agoExplorer | Level 3
Hey,
I posted a whole reply, but it get removed? But now I see that len(chunk) does not represent the correct bit length.
You actually have to put the chunks in a ByteBuffer to correctly split it in the 4mb chunks. Weird how len(chunk)
is exatly devided by 2, somehow this is actually 8mb. But thanks for the reply and the info! Now it's working great.
Greetings,
Moose
- Greg-DB4 years agoDropbox Staff
Thanks for following up. I'm glad to hear you already sorted this out. (Your other message got caught in the spam filter for some reason. I've restored it.)
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!