mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: series upload
This commit is contained in:
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user