diff --git a/api/internal/init.js b/api/internal/init.js index dd98e5b45b..711ed6ef16 100644 --- a/api/internal/init.js +++ b/api/internal/init.js @@ -135,9 +135,9 @@ if ((globalThis.window) === globalThis) { for (const handle of handles) { if (typeof handle.getFile === 'function') { - const file = handle.getFile() + const file = await handle.getFile() const buffer = new Uint8Array(await file.arrayBuffer()) - files.push(new File(buffer, file.name, { + files.push(new File([buffer], file.name, { lastModified: file.lastModified, type: file.type }))