Skip to content

Commit

Permalink
Update busboy sample to use on('close') (#2766)
Browse files Browse the repository at this point in the history
* Update busboy sample to use on('close')

Per this update, busboy should use on('close') rather than on('finish').
mscdex/busboy#266

* Update busboy version

Co-authored-by: Jennifer Davis <iennae@gmail.com>
Co-authored-by: Adam Ross <adamross@google.com>
Co-authored-by: Karl Weinmeister <11586922+kweinmeister@users.noreply.github.com>
  • Loading branch information
4 people committed Nov 28, 2022
1 parent e252bdf commit 0730d8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/http/package.json
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"@google-cloud/storage": "^6.0.0",
"busboy": "^1.0.0",
"busboy": "^1.6.0",
"escape-html": "^1.0.3"
}
}
2 changes: 1 addition & 1 deletion functions/http/uploadFile/index.js
Expand Up @@ -73,7 +73,7 @@ exports.uploadFile = (req, res) => {
file.on('end', () => {
writeStream.end();
});
writeStream.on('finish', resolve);
writeStream.on('close', resolve);
writeStream.on('error', reject);
});
fileWrites.push(promise);
Expand Down

0 comments on commit 0730d8d

Please sign in to comment.