mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 00:31:25 +10:00
* feat: support for file upload handler to track multiple files * feat: update image upload endpoint to allow multiple files * fix: lint
This commit is contained in:
@ -20,8 +20,8 @@ export default defineEventHandler(async (h3) => {
|
||||
statusMessage: "Failed to upload file",
|
||||
});
|
||||
|
||||
const [id, options, pull, dump] = uploadResult;
|
||||
if (!id) {
|
||||
const [ids, options, pull, dump] = uploadResult;
|
||||
if (ids.length == 0) {
|
||||
dump();
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
@ -48,7 +48,7 @@ export default defineEventHandler(async (h3) => {
|
||||
},
|
||||
data: {
|
||||
mImageLibraryObjectIds: {
|
||||
push: id,
|
||||
push: ids,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user