Learn how to make the most out of the Dropbox Community here 💙.
Learn how to make the most out of the Dropbox Community here 💙.
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.
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
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.)
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!