diff options
| author | bobzel <zzzman@gmail.com> | 2022-03-01 19:59:47 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-03-01 19:59:47 -0500 |
| commit | 35f0c9940d0ea7c0cb37c711557454b77ac038ad (patch) | |
| tree | 6487e8217e768705020916e85a3f236b493f3699 /src/client/util/Import & Export/DirectoryImportBox.tsx | |
| parent | 0b9e28a92487dc3a69519877d92235fca02b1b8c (diff) | |
updated to webpack 5
Diffstat (limited to 'src/client/util/Import & Export/DirectoryImportBox.tsx')
| -rw-r--r-- | src/client/util/Import & Export/DirectoryImportBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/Import & Export/DirectoryImportBox.tsx b/src/client/util/Import & Export/DirectoryImportBox.tsx index 925b74efa..cf72cd0df 100644 --- a/src/client/util/Import & Export/DirectoryImportBox.tsx +++ b/src/client/util/Import & Export/DirectoryImportBox.tsx @@ -86,7 +86,7 @@ export class DirectoryImportBox extends React.Component<FieldViewProps> { for (let i = 0; i < files.length; i++) { const file = files.item(i); if (file && !unsupported.includes(file.type)) { - const ext = path.extname(file.name).toLowerCase(); + const ext = file.name.replace(/.*\./, "").toLowerCase(); // path.extname(file.name).toLowerCase(); if (AcceptableMedia.imageFormats.includes(ext)) { validated.push(file); } @@ -120,7 +120,7 @@ export class DirectoryImportBox extends React.Component<FieldViewProps> { } const { accessPaths, exifData } = result; const path = Utils.prepend(accessPaths.agnostic.client); - const document = await DocUtils.DocumentFromType(type, path, { _width: 300, title: name }); + const document = type && await DocUtils.DocumentFromType(type, path, { _width: 300, title: name }); const { data, error } = exifData; if (document) { Doc.GetProto(document).exif = error || Doc.Get.FromJson({ data }); |
