Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I understand I can use upload sessions to upload large files. That is: call Upload Session Start, then Upload Session Append and finally Upload Session Finish.
My question: is it possible to query what is the current offset taking only the session id?
The scenario is: application calls Upload Session Start, saves (persists) the session id, calls several times Upload Session Append.
Then the application exits (either by user request or by a failure).
The application starts again, takes the saved session id and tries to continue the upload (with Upload Session Append).
However it seems there is no way to query what is the current offset.
Possible solutions are: persist the current offset together with the serssion id.
Or call Append with an invalid offset (eg 0), it returns the `UploadSessionOffsetError` error with the correct offset.
Is it ok to rely on the UploadSessionOffsetError?
@josuegomes wrote:...
Possible solutions are: persist the current offset together with the serssion id.
Or call Append with an invalid offset (eg 0), it returns the `UploadSessionOffsetError` error with the correct offset.
Is it ok to rely on the UploadSessionOffsetError?
Hi @josuegomes,
Yes, that's are the possible ways. Is it Ok or Not - it's your design decision; it would work. I personally prefer the first option (to save current state - both id and offset or set of offsets/pattern when concurrent upload is in use).
Good luck.
@josuegomes Yes, as Здравко said, either way would work. In general though the expectation is that the app would record the current offset locally.
Hi there!
If you need more help you can view your support options (expected response time for a 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!