Binary file issues - Axios passthrough options not documented
Closed this issue ยท 4 comments
hubpuller commented
Related to #1
We ran into an issue where binary downloads were not working.
This can be addressed by adding the responseType attribute as an 'arraybuffer'.
There is no documentation on passing through options to the axios library used
e.g. this is the correct way to download binary files.
b2.downloadFileById({
fileId: fileId,
responseType: 'arraybuffer'
See a stackoverflow answer related to this issue here:
https://stackoverflow.com/questions/41846669/download-an-image-using-axios-and-convert-it-to-base64
haywirez commented
@hubpuller Thank you so much, I was going in circles for about an hour. Also relevant to #15
hubpuller commented
Yes, we ran in a lot of oval shapes while trying to figure this out! Glad it helped.
yakovkhalinsky commented
odensc commented
Looks like the readme covers this now, so I'll close the issue. ๐