Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
RTS S.
10 years agoHelpful | Level 6
Java API V2 Session Upload
Can you post a simple example showing how to use:
uploadSessionStart uploadSessionAppendBuilder uploadSessionFinishBuilder Including intermediate steps ... I am stuck on how to get a Sess...
Kannan G.1
Dropbox Staff
10 years agoThis API is kind of a mess right now. We need to sort some things out to make it clearer, but for now, this might work:
```
DbxClientV2 client = ...
uploader = client.files.uploadSessionStart();
String sessionId;
try {
uploader.getBody().write(first_chunk_of_upload)
sessionId = uploader.finish()
} finally {
uploader.close()
}
uploader = client.files.uploadSessionAppend(sessionId, offset)
try {
uploader.getBody().write(second_chunk_of_upload)
uploader.finish()
} finally {
uploader.close()
}
cursor = UploadSessionCursor(sessionId, offset);
FileMetadata md = client.files.uploadSessionFinishBuilder(cursor, ...).run(third_chunk_of_upload);
```
I don't have time to test the code right now. Lemme know if you run into any issues and I'll take a closer look.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!