diff --git a/client/madge-graph.svg b/client/madge-graph.svg deleted file mode 100644 index 3f75254d9..000000000 --- a/client/madge-graph.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - -G - - - diff --git a/client/src/components/documents-upload/documents-upload.utility.js b/client/src/components/documents-upload/documents-upload.utility.js index abc0315f1..bca78f094 100644 --- a/client/src/components/documents-upload/documents-upload.utility.js +++ b/client/src/components/documents-upload/documents-upload.utility.js @@ -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, diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.delete.component.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.delete.component.jsx index 9d3764daf..4928c572b 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.delete.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.delete.component.jsx @@ -37,7 +37,7 @@ export default function JobsDocumentsDeleteButton({ }), }); } else { - successfulDeletes.push(key); + successfulDeletes.push(key.replace(/\.[^/.]+$/, "")); } }); }); diff --git a/server/media/media.js b/server/media/media.js index 727c040c9..e427cd069 100644 --- a/server/media/media.js +++ b/server/media/media.js @@ -60,7 +60,7 @@ exports.deleteFiles = async (req, res) => { //delete images returns.push( returns.push( await cloudinary.api.delete_resources( - types.raw.map((x) => x.key), + types.raw.map((x) => `${x.key}.${x.extension}`), { resource_type: "raw" } ) );