Skip to content

Downloading a binary file and saving it #1720

Answered by sindresorhus
ayuhito asked this question in Q&A
Discussion options

You must be logged in to vote

What errors are you getting?

Don't forget that you also have to create the directory before writing if it doesn't already exist. Also, drop the encoding option.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@sindresorhus
Comment options

@ayuhito
Comment options

@szmarczak
Comment options

@ayuhito
Comment options

@szmarczak
Comment options

Answer selected by ayuhito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants