Server IP : 162.213.251.212 / Your IP : 3.149.253.168 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/allssztx/nodevenv/needapair.com/20/lib/node_modules/multer/lib/ |
Upload File : |
function removeUploadedFiles (uploadedFiles, remove, cb) { var length = uploadedFiles.length var errors = [] if (length === 0) return cb(null, errors) function handleFile (idx) { var file = uploadedFiles[idx] remove(file, function (err) { if (err) { err.file = file err.field = file.fieldname errors.push(err) } if (idx < length - 1) { handleFile(idx + 1) } else { cb(null, errors) } }) } handleFile(0) } module.exports = removeUploadedFiles