I have a stream that downloads a nearly 3GB file. However, each time it finishes prematurely at 1.25GB. What's going on and how can I fix this?
var file = fs.createWriteStream("/Users/user/Documents/crime.csv");
http.get("http://data.cityofchicago.org/api/views/c4ep-ee5m/rows.csv?accessType=DOWNLOAD", function(response) {
response.pipe(file)
file.on('error', function(e) { console.log(e) })
file.on('finish', function() { console.log('finished') } )
})
via QueSo
No comments:
Post a Comment