diff --git a/lib/index.js b/lib/index.js index 851a8f4..eaa531c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -154,10 +154,14 @@ function processMultipart(options, req, res, next) { req.files[fieldname] = [req.files[fieldname], newFile]; } }); + + file.on('error', next); }); busboy.on('finish', next); + busboy.on('error', next); + req.pipe(busboy); }