IO-1177 Resolve deleting of raw files.

This commit is contained in:
Patrick Fic
2021-06-14 09:50:30 -07:00
parent bb2d62a11c
commit f8c1087360
4 changed files with 8 additions and 17 deletions

View File

@@ -132,9 +132,13 @@ export const uploadToCloudinary = async (
//Insert the document with the matching key.
let takenat;
if (fileType.includes("image")) {
const exif = await exifr.parse(file);
try {
const exif = await exifr.parse(file);
takenat = exif && exif.DateTimeOriginal;
takenat = exif && exif.DateTimeOriginal;
} catch (error) {
console.log("Unable to parse image file for EXIF Data");
}
}
const documentInsert = await client.mutate({
mutation: INSERT_NEW_DOCUMENT,

View File

@@ -37,7 +37,7 @@ export default function JobsDocumentsDeleteButton({
}),
});
} else {
successfulDeletes.push(key);
successfulDeletes.push(key.replace(/\.[^/.]+$/, ""));
}
});
});