Closed
Description
Hi I have tried both with
app.get('/file/:imageId', function(req, res){
var remoteFile = bucket.file(req.params.imageId);
var localFilename = 'uploads/' + req.params.imageId;
var src = remoteFile.createReadStream()
src
.on('error', function(err) {
console.log(err)
})
.on('data', function(data){
})
.on('response', function(response) {
// console.log(response)
// Server connected and responded with the specified status and headers.
})
.on('end', function() {
// The file is fully downloaded.
console.log('fully downloaded');
})
src.pipe(res);
// .pipe(fs.createWriteStream(localFilename));
res.attachment(localFilename);
})
and
var remoteFile = bucket.file('large.zip')
remoteFile.createReadStream().pipe(fs.createWriteStream('uploads/test.dmg'))
and in both cases the server seems to stop the file I'm trying with is about 300mb but I also need to be able to handle gb files.
Metadata
Metadata
Assignees
Labels
No labels