diff --git a/src/fileCollectionFromFileList.ts b/src/fileCollectionFromFileList.ts index a5fccee..7050f78 100644 --- a/src/fileCollectionFromFileList.ts +++ b/src/fileCollectionFromFileList.ts @@ -24,8 +24,9 @@ export async function fileCollectionFromFileList( const item = { name: file.name, size: file.size, - //@ts-expect-error We allow file.path as alternative to webkitRelativePath - relativePath: file.webkitRelativePath || file.path || file.name, + relativePath: + //@ts-expect-error We allow file.relativePath or file.path as alternative to webkitRelativePath + file.webkitRelativePath || file.relativePath || file.path || file.name, lastModified: file.lastModified, text: () => file.text(), arrayBuffer: () => file.arrayBuffer(), diff --git a/src/fileCollectionFromFiles.ts b/src/fileCollectionFromFiles.ts index 1ff3a51..7661ded 100644 --- a/src/fileCollectionFromFiles.ts +++ b/src/fileCollectionFromFiles.ts @@ -22,8 +22,9 @@ export async function fileCollectionFromFiles( const item = { name: file.name, size: file.size, - //@ts-expect-error We allow file.path as alternative to webkitRelativePath - relativePath: file.webkitRelativePath || file.path || file.name, + relativePath: + //@ts-expect-error We allow file.relativePath or file.path as alternative to webkitRelativePath + file.webkitRelativePath || file.relativePath || file.path || file.name, lastModified: file.lastModified, text: () => file.text(), arrayBuffer: () => file.arrayBuffer(),