@dnax/core 0.30.4 → 0.30.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/hono.ts +13 -2
- package/package.json +1 -1
package/app/hono.ts
CHANGED
|
@@ -416,12 +416,23 @@ function HonoInstance(): typeof app {
|
|
|
416
416
|
|
|
417
417
|
if (Array.isArray(parseBody?.file)) {
|
|
418
418
|
let insertedFiles = [];
|
|
419
|
-
|
|
419
|
+
|
|
420
|
+
let indexedData = 0;
|
|
421
|
+
let allFiles = parseBody?.file;
|
|
422
|
+
for await (let file of allFiles) {
|
|
423
|
+
let d;
|
|
424
|
+
if (Array.isArray(data)) {
|
|
425
|
+
d = data[indexedData];
|
|
426
|
+
} else {
|
|
427
|
+
d = data;
|
|
428
|
+
}
|
|
420
429
|
let insertedFile = await drive.write(file.name, file);
|
|
430
|
+
|
|
421
431
|
insertedFiles.push({
|
|
422
|
-
...
|
|
432
|
+
...d,
|
|
423
433
|
_file: insertedFile,
|
|
424
434
|
});
|
|
435
|
+
indexedData++;
|
|
425
436
|
}
|
|
426
437
|
response = await rest.insertMany(col?.slug, insertedFiles);
|
|
427
438
|
} else if (typeof parseBody?.file == "object") {
|