cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it 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: How to get upload progress with Java SDK v2?

How to get upload progress with Java SDK v2?

sigefi
New member | Level 2

Hi everyone,

 

I have searched the Dropbox documentation on its Developers page and on Stackoverflow, and I haven't found a way to get the upload progress of a file in the Java SDK v2. Could someone help me with this?

 

PD: I want the upload progress to show it in a JProgressBar.

 

Thank you so much.

3 Replies 3

Rich
Super User II
Moved to the API forum.

Greg-DB
Dropbox Staff

[Cross-linking for reference:  https://stackoverflow.com/questions/41592694/how-to-get-upload-progress-with-java-sdk-for-dropbox-ap...]

 

The API v2 Java SDK doesn't currently expose progress listeners for uploads, but I'll be sure to pass this along as a feature request. 

Greg-DB
Dropbox Staff

The Dropbox API v2 Java SDK now offers progress listeners for uploads and downloads. This has been released in v3.0.9:

https://github.com/dropbox/dropbox-sdk-java/releases/tag/v3.0.9

There's an example of using it with with the uploadAndFinish method ( https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/DbxUploader.html#uploadA... ) for an upload here:

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/upload-file/src/main/java/com/dropb...

It works the same way with file downloads; the download method ( https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/DbxDownloader.html#downl... ) optionally takes a ProgressListener parameter the same way.

Need more support?