Pulling down binary data (e.g. images) from Dropbox doesn't seem to be handled properly. When the blobs returned from getFile or getThumbnail are written to disk as jpg's, they are corrupted.
Looked into passing the strings returned from Dropbox into Buffers using binary encoding, but this didn't solve the problem outright.
The root issue of this seems to be the fact that node-oauth defaults GETs to utf8.
So, is there any solution available or will this require hacking into node-oauth?
@ciaranj has been totally unresponsive on this, so I'm assuming it'll require node-oauth surgery.
eh? tbh I hadn't noticed it as an issue on github!
No worries. @ralphholzmann filed this issue a while back and then we kinda forgot about it.
As a work around, instead of passing a callback function to to the node-oauth get , it will return a request object that you can configure whatever encoding you wish on when you add a response handler to it .. would that not help ?
Thanks guys for responding so quickly! Claranj, that sounds great to me. I just tried dropbox-node w/the setEncoding('utf-8') changed to setEncoding('binary') and got a file that was not corrupted from dropbox, so for sure adding the request object to configure the encoding would be great.
Closing this issue, as this library has long been deprecated.