Dropbox binary file download...

274 views
Skip to first unread message

Sinusoidal

unread,
Dec 15, 2015, 6:02:32 PM12/15/15
to Node-RED
Hi, been trying out the dropbox nodes and generally I think they're exactly what we're looking for in a current project. However, I'm trying to download a firmware file that we have put in the app dropbox and the file has the incorrect size. It's a .bin file, and we would expect the response header to be content-type: application/octet-stream. It is text/html. When we (i'm sure rather naively) try to change content-type to application/octet-stream in the response, this seems to work but there is a ";charset: utf-8" appended to the content-type. And it still doesn't work to download the file, which is still of the incorrect size.

How can we set the right content-type for our binary file? If we can't, perhaps the aws bucket node might offer the download options we need?

Thanks
Alan

Sinusoidal

unread,
Dec 16, 2015, 4:25:25 AM12/16/15
to Node-RED
Solved it using the watch node and an http request node instead. Probably better in the long run, but still curious as to why my application/octet-stream had ;charset: utf-8 appended. Also curious as to where I should be looking for answers on this...

Dave C-J

unread,
Dec 16, 2015, 4:45:51 AM12/16/15
to node...@googlegroups.com
You're in the right place.. 
We will try to have a look at the Dropbox node. I guess it didn't get the same love as the http one as far as binary downloads go.

Sinusoidal

unread,
Dec 16, 2015, 5:33:45 AM12/16/15
to Node-RED
:thumbsup: (as we say on slack...)

Dave C-J

unread,
Dec 16, 2015, 6:53:12 PM12/16/15
to Node-RED
Hi - I have pushed a fix to npm - now version 0.1.2
It should now try to detect binary files and returns them as a binary buffer object.
Reply all
Reply to author
Forward
0 new messages