Closed yuxiaoyan1205 closed 7 years ago
That's because you're running out of memory. We're storing the file in memory if you're using the Promise based API. Try using streams instead:
download('unicorn.com/foo.zip').pipe(fs.createWriteStream('foo.zip'));
Hi,kevva: I use streams:download('unicorn.com/foo.zip').pipe(fs.createWriteStream('foo.zip')); but it is still error: The size of this zip package is 1.2G。
Are you running this in the browser?
yes
I'm pretty sure that won't work. This package is intended for use in Node.js.
OK,thanks
download--http://192.168.2.237:8899/ZIP/5975681569e5f4941e595640.zip--failed--RangeError : Array buffer allocation failed