-
-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hi,
This lib is very usefull, it would be good to have support to multiple uploads at once.
router.post('/update', isAuthorized, upload.array('images', 20), update);
const upload = multer({
storage: s3Storage({
s3,
ACL: 'public-read',
Bucket: config.awsBucket,
multiple: true,
crop: 'attention',
resize: [
{ suffix: 'xlg', width: 1200 },
{ suffix: 'lg', width: 800, height: 600 },
{ suffix: 'md', width: 500, height: 500 },
{ suffix: 'sm', width: 265, height: 190 },
{ suffix: 'xs', width: 100 },
],
Key(req, file, cb) {
cb(null, ${Buffer.from(file.originalname).toString('base64')}_${Date.now().toString()}
);
},
}),
});
Right now if I use this code to upload several images, the first one is uploaded successfully but the rest all are stored with 0 bites.