feat: series upload

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 7a59c2fc71
commit 37e56d94ce

@ -33,7 +33,11 @@ uploadsController.upload = async function (req, res, filesIterator) {
} }
try { try {
const images = await Promise.all(files.map(fileObj => filesIterator(fileObj))); const images = [];
for (const fileObj of files) {
/* eslint-disable no-await-in-loop */
images.push(await filesIterator(fileObj));
}
res.status(200).json(images); res.status(200).json(images);
} catch (err) { } catch (err) {
res.status(500).json({ path: req.path, error: err.message }); res.status(500).json({ path: req.path, error: err.message });

Loading…
Cancel
Save