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: 

Download XLSX files from Dropbox API using NodeJS

Download XLSX files from Dropbox API using NodeJS

GustavoLeopoldo
Explorer | Level 3
Go to solution

Hi Community,

I'm having some issues to download XLSX files from Dropbox API using NodeJs. The response is ok (200), but I need to use content-Type as binary or Txt. I would like to download the XLS file SAVE it into a local folder. Could you help me with that?

 

Thanks

Gustavo

1 Accepted Solution

Accepted Solutions

Здравко
Legendary | Level 20
Go to solution

@GustavoLeopoldo wrote:

... The response is ok (200), but I need to use content-Type as binary or Txt. ...


Hi @GustavoLeopoldo,

Since you have successfully received your data, you don't need to observe what's the actual transfer type (content-type). This same content is saved as is in your response object as binary/blob and you can do the same like you can to any other such object (i.e. to save as a file, process it, etc.). Just do it; it's not clear what's the actual issue. There is a bunch of data matching exactly to the file downloaded. It's your decision how you would interpret them (text, binary, etc.). The result contains metadata too and it might help you define actual data type.

Hope this helps.

 

Add: Here is a simple example how a file could be saved. Good luck.

View solution in original post

2 Replies 2

Здравко
Legendary | Level 20
Go to solution

@GustavoLeopoldo wrote:

... The response is ok (200), but I need to use content-Type as binary or Txt. ...


Hi @GustavoLeopoldo,

Since you have successfully received your data, you don't need to observe what's the actual transfer type (content-type). This same content is saved as is in your response object as binary/blob and you can do the same like you can to any other such object (i.e. to save as a file, process it, etc.). Just do it; it's not clear what's the actual issue. There is a bunch of data matching exactly to the file downloaded. It's your decision how you would interpret them (text, binary, etc.). The result contains metadata too and it might help you define actual data type.

Hope this helps.

 

Add: Here is a simple example how a file could be saved. Good luck.

GustavoLeopoldo
Explorer | Level 3
Go to solution

Hi @Здравко

It's working properly now. SDK is the best option. Excellent support. Thanks

 
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    GustavoLeopoldo Explorer | Level 3
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?