aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/Import & Export
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/Import & Export')
-rw-r--r--src/client/util/Import & Export/DirectoryImportBox.tsx4
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 });