We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
jimbob1977
6 years agoHelpful | Level 6
What Happens To Incomplete Upload Session Start Commands
Hi
Hopefully an easy one to answer.
"What happens to incomplete Upload Session Starts"??
For Example...
I script an upload session start.
I have a Session End script waiting for the Reply with SessionID
What if I dont receive this?? (Network Glitch Etc) The session end script will be hanging
The session will not end.
I could re-script so if no reply I start a new session upload of same data
But will this leave hangs at dropbox end???
In addition...
What if I send one session upload start command
Before the previous upload is complete I send a second session upload command for a different file
I can handle handle sessionIDs at my end but is dropbox OK with this??
Think I know the answer but always worth checking
3 Replies
- jimbob19776 years agoHelpful | Level 6
Following On From My Previous Query.
Yesterday My Session Start + End Commands Worked Fine.
Today I get an error on session end saying that offset shopuld be "0"???
I change offset to "0" and resend command.
The session closes fine and the file is there in full.
So how come the offset was "0"
- Greg-DB6 years ago
Dropbox Community Moderator
All Dropbox API upload sessions expire after 48 hours. If you start one and never complete it, it will become invalid 48 hours after it was started and the data will not be committed.
If you call to finish an upload session but don't receive the response, e.g., due to a network issue, it's possible the request did still make it to Dropbox and was serviced by Dropbox, in which case the file may have been committed. You can call the API again (e.g., /2/files/get_metadata or /2/files/list_folder[/continue], for instance), to check if the file was in fact committed.
The Dropbox API does allow you to have multiple active upload sessions at the same time, so you can have multiple different upload sessions for different files and use them in parallel. Please refer to the Data Ingress Guide for information on avoiding lock contention though.
Finally, I'm not sure I understand the scenario with offset:0 that you described. If something's not working as expected, please share the relevant code and unexpected output so we can look into it. (Be sure to redact your access token though.) Thanks!
- jimbob19776 years agoHelpful | Level 6Hi Greg
Thanks for the response
all makes sense
I’ll explore the metadata call further to add further error checking
Ignore the final query... solved
Thanks again
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 9 months ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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!