cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: What Happens To Incomplete Upload Session Start Commands

What Happens To Incomplete Upload Session Start Commands

jimbob1977
Helpful | Level 6

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 3

jimbob1977
Helpful | 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-DB
Dropbox Staff

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!

jimbob1977
Helpful | Level 6
Hi 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
Need more support?