From 56ea954743252f2f43cbf429474699765e8c4f0a Mon Sep 17 00:00:00 2001 From: Aaron Gabriel Neyer Date: Thu, 22 Sep 2022 12:52:10 -0600 Subject: [PATCH] Update busboy sample to use on('close') Per this update, busboy should use on('close') rather than on('finish'). https://github.com/mscdex/busboy/issues/266 --- functions/http/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/http/index.js b/functions/http/index.js index 1cbf063fc4..60bee645e3 100644 --- a/functions/http/index.js +++ b/functions/http/index.js @@ -163,7 +163,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);