Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary file issues - Axios passthrough options not documented #33

Closed
hubpuller opened this issue Nov 3, 2017 · 4 comments
Closed

Binary file issues - Axios passthrough options not documented #33

hubpuller opened this issue Nov 3, 2017 · 4 comments

Comments

@hubpuller
Copy link

hubpuller commented Nov 3, 2017

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
Copy link
Contributor

haywirez commented May 12, 2018

@hubpuller Thank you so much, I was going in circles for about an hour. Also relevant to #15

@hubpuller
Copy link
Author

Yes, we ran in a lot of oval shapes while trying to figure this out! Glad it helped.

@yakovkhalinsky
Copy link
Owner

#44 from @haywirez has added this to the README, thank you 👍

@odensc
Copy link
Collaborator

odensc commented Jan 17, 2019

Looks like the readme covers this now, so I'll close the issue. 👍

@odensc odensc closed this as completed Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants