(err)?log.error(`Multer encountered an ${!(errinstanceofmulter.MulterError)?'unknown ':''}error`,err).callback(next,err):log.debug('Multer','File saved in temp dir').callback(next);
(err)?log.error(`Multer encountered an ${!(err.toString().includes('MulterError'))?'unknown ':''}error`,err).callback(next,err):log.debug('Multer','File saved in temp dir').callback(next);
}),processUploaded,({next})=>next());
}),processUploaded,({next})=>next());
router.use('/',(err,_req,res,next)=>err.code&&err.code==='LIMIT_FILE_SIZE'?log.warn('Upload blocked','File too large').callback(()=>res.status(CODE_PAYLOAD_TOO_LARGE).send(`Max upload size: ${maxUploadSize}MB`)):next(err));// skipcq: JS-0229
router.use('/',(err,_req,res,next)=>err.code&&err.code==='LIMIT_FILE_SIZE'?log.warn('Upload blocked','File too large').callback(()=>res.status(CODE_PAYLOAD_TOO_LARGE).send(`Max upload size: ${maxUploadSize}MB`)):next(err));// skipcq: JS-0229