diff --git a/functions/http/package.json b/functions/http/package.json index 5fc1516aae..9947ee8043 100644 --- a/functions/http/package.json +++ b/functions/http/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@google-cloud/storage": "^6.0.0", - "busboy": "^1.0.0", + "busboy": "^1.6.0", "escape-html": "^1.0.3" } } diff --git a/functions/http/uploadFile/index.js b/functions/http/uploadFile/index.js index 51476ee734..0093024c3f 100644 --- a/functions/http/uploadFile/index.js +++ b/functions/http/uploadFile/index.js @@ -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);