Closed dimitri-gigot closed 10 months ago
+1
here's a PR that addresses the bug https://github.com/richardgirges/express-fileupload/pull/366 cc @richardgirges
Hi,
I have another idea regarding this. Since it can be several cases which lead to the exception, what if just wrap the final function in try/catch, instead of trying to consider all possible options?
module.exports = (req) => {
try {
return hasBody(req) && hasAcceptableMethod(req) && hasAcceptableContentType(req);
} catch (e) {
return false;
}
};
Fixed with the PR #367 Published new version 1.4.3
Hi,
Since version 1.4.2 , this error appeared in our Sentry. Seems easy to fix by checking if "contType" exist before trying to see if it "includes('boundary=')".
I'm not used to posting issues or trying to fix them but i'll do my best 😄