I need to add 100 files at a time using multer multiple file upload. For now 10 file's can be upload easly , but if I try to add more than 10 files it will throw an error like below,
Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) { message: 'read ECONNRESET', errno: 'ECONNRESET', code: 'NetworkingError', syscall: 'read', region: 'xx-xx-1', hostname: 'xxxxxxx.s3.amazonaws.com', retryable: true, time: 2020-08-05T05:52:39.950Z, statusCode: 400, storageErrors: [] }
Can you guys pla help , also I need to know the max count of files that multer accepts to upload, is there any way to set timeout for upload function only.
router.post('/files/fileuploads', upload.fields([{
name: 'multi-files', maxCount: 100
}]), methods.multipleUpload)
const upload = multer({
storage: multerS3({
s3: s3,
bucket: 'xxxxxx',
metadata: function (req, file, cb) {
cb(null, {fieldName: file.originalname});
},
key: function (req, file, cb) {
cb(null, file.originalname)
}
}),
fileFilter: fileFilter
});