Closed Benez11 closed 3 years ago
Thank you! I will get this pushed up on the next release shortly.
I updated to latest version 1.2.1, but I am still getting "Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client" after assigning limitHandler. Can someone help?
app.use(fileUpload({ limits: { fileSize: 3 * 1024 * 1024 }, limitHandler: (req, res, next) => res.json({ 'success': false, 'message': 'File size limit has been reached' }) }));
I'm getting this issue too, looks like the next()
function is still being called after an abort. @richardgirges is there a fix for this? for now I've fixed this with in my function.
if (res.headersSent) {
return;
}