We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
DavidM27
5 years agoExplorer | Level 4
Issue UploadSession and UploadSessionBatch with big files
Hello, I'm working with the dropbox API in TypeScript. I do want to be able to able all kind of files (small, large, multiple files...) For that I have made a method to uplaod a single file, an...
- 5 years ago
When using filesUploadSessionFinishBatch, "UploadSessionStartArg.close or UploadSessionAppendArg.close needs to be true for the last upload_session/start or upload_session/append_v2 call". That is to say, since filesUploadSessionFinishBatch can't itself take any further file data, you need to make sure you've already finished sending all of the file data for each upload session, and have indicated that to the Dropbox API on the previous call for that upload session, by setting 'close' to 'true'.
The 'not_closed' error you're getting is indicating that you didn't close the upload session before calling filesUploadSessionFinishBatch. So, you'll need to update your code to set 'close:true' on UploadSessionAppendArg for the the last call to filesUploadSessionAppendV2 for each upload session that you're then sending to filesUploadSessionFinishBatch.
Greg-DB
Dropbox Staff
When using filesUploadSessionFinishBatch, "UploadSessionStartArg.close or UploadSessionAppendArg.close needs to be true for the last upload_session/start or upload_session/append_v2 call". That is to say, since filesUploadSessionFinishBatch can't itself take any further file data, you need to make sure you've already finished sending all of the file data for each upload session, and have indicated that to the Dropbox API on the previous call for that upload session, by setting 'close' to 'true'.
The 'not_closed' error you're getting is indicating that you didn't close the upload session before calling filesUploadSessionFinishBatch. So, you'll need to update your code to set 'close:true' on UploadSessionAppendArg for the the last call to filesUploadSessionAppendV2 for each upload session that you're then sending to filesUploadSessionFinishBatch.
DavidM27
5 years agoExplorer | Level 4
Greg, thank you for your reply !
So if I understand properly, correct me if I'm wrong, in case of uplaoding a big files within a batch session, I should not stop the AppendArgV2() at the chunkList-1 but until all the chunk are uploaded and then I build my finishArg. But in the other case I should stick with what I've done.
What if I always append all chunks and close on the last chunk ? Does it sound possible to you ?
- DavidM275 years agoExplorer | Level 4
I'm answering my own question, it seems to work when I always close the fileUploadSession with the appendArg on the last chunk event when I'm not using the batch.
Thank you for your help ! If you have any comments or suggestion on the code I sent you above please let me know I would be glad to have your feedback on it.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months 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!