fix promise.All location
This commit is contained in:
parent
31b7e62983
commit
4ad7892eab
1 changed files with 2 additions and 3 deletions
|
|
@ -131,8 +131,8 @@ export async function handleConvert(
|
|||
|
||||
|
||||
for (const chunk of chunks(fileNames, MAX_CONVERT_PROCESS)) {
|
||||
const toProcess: Promise<string>[] = [];
|
||||
for(const fileName of chunk) {
|
||||
const toProcess: Promise<string>[] = [];
|
||||
const filePath = `${userUploadsDir}${fileName}`;
|
||||
const fileTypeOrig = fileName.split(".").pop() ?? "";
|
||||
const fileType = normalizeFiletype(fileTypeOrig);
|
||||
|
|
@ -159,9 +159,8 @@ export async function handleConvert(
|
|||
}).catch(c => reject(c));
|
||||
})
|
||||
);
|
||||
|
||||
await Promise.all(toProcess);
|
||||
}
|
||||
await Promise.all(toProcess);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue