diff --git a/lib/middleware.js b/lib/middleware.js index b44eb2b..c48d715 100644 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -7,6 +7,11 @@ function parse(opts) { Object.assign(form, opts); return (req, res, next) => { + form.on('error', (err) => { + next(err); + return; + }); + form.parse(req, (err, fields, files) => { if (err) { next(err);