Answer the question
In order to leave comments, you need to log in
Downloading parts of request nodejs?
By default, the request library downloads everything into an internal body object, which is stored in RAM. There are files of 5-6GB, which I do not want to stick into the RAM. Tell me how to make a gradual write to a file and is it possible with this library?
Answer the question
In order to leave comments, you need to log in
You just need to download through the stream :
request('https://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question