You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Adi4's avatar
Adi4
Explorer | Level 3
2 years ago

Want to perform Download Operation

Hi everyone!

I want to perform download operation but it is only give information about file
I use this :

try {
outputViews.write(documentUtility.newDocument(client.files().download(filePath)));
} catch (DbxException e) {
throw new RuntimeException(e);
}

I want to perform download operation. If their any other way to perform or if their any need to changes please help in this 
Thank you!

 

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    Hi Adi4,

    Keep in mind that download method, you're using, returns DbxDownloader object representing the entire response, not directly the content! This object contains the file metadata as well as stream usable for fetch the actual file's content. As seems, you handle object as data - something that stringify current object state (usually the metadata).

    Hope this gives direction.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Adi4 Здравко is correct; that download method returns a DbxDownloader, not the file data directly. Refer to the linked documentation for more information on using that functionality.