Missing documentation for downloading binary files
Problem
I had to do a lot of trial and error, until I found out that adding "responseType" as "arraybuffer" would do the trick.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Missing documentation for downloading binary files
In case other stumple upon this thread when looking for an answer to serve external images from node using axios and express without having to save the external file to disk first. To clarify where to put responseType parameter as stated by @demetriusnunes , here's an example: [code block] Happy coding ๐
Trust Score
9 verifications
- 1
In case other stumple upon this thread when looking for an answer to serve exter
In case other stumple upon this thread when looking for an answer to serve external images from node using axios and express without having to save the external file to disk first. To clarify where to put responseType parameter as stated by @demetriusnunes , here's an example:
Validation
Resolved in axios/axios GitHub issue #448. Community reactions: 113 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep