Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

abcd12341's avatar
abcd12341
Explorer | Level 3
7 years ago

Javascript API Clarity - filesDownload()

I've been learning the Javascript API and am having a bumpy journey with filesDownload().

 

 

Looking at the docs...

 

http://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesDownload__anchor

 

...the function is meant to be the way to download a file. However, the only arg it takes is one in which { path, rev } are specified. And the non-error response is a...

 

http://dropbox.github.io/dropbox-sdk-js/global.html#FilesFileMetadata

 

...which contains no fields that encapsulate the actual data being returned.

 

Upon inspection with a quick console.log() there is a 'fileBlob' field being returned but my concern is that directly accessing this field is an unsupported operation since it isn't listed in the FilesFileMetadata docs. Thus I'm concluding that either the docs are missing that field or that I haven't yet groked the intended workflow for downloading files (implying that the docs could be more helpful here).

3 Replies

Replies have been turned off for this discussion
  • Dzivo's avatar
    Dzivo
    New member | Level 2
    1 year ago

    @greg still not documented 6 years later what is the type of fileBinary is it a Blob ?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    1 year ago

    Dzivo The fileBinary returned by the Dropbox JavaScript SDK in Node is a Buffer. (The fileBlob returned by the Dropbox JavaScript SDK in browser JavaScript is a Blob.)

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

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!