IO-1177 Resolve deleting of raw files.
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
|
||||||
-->
|
|
||||||
<!-- Title: G Pages: 1 -->
|
|
||||||
<svg width="43pt" height="43pt"
|
|
||||||
viewBox="0.00 0.00 43.20 43.20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
||||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(21.6 21.6)">
|
|
||||||
<title>G</title>
|
|
||||||
<polygon fill="#111111" stroke="transparent" points="-21.6,21.6 -21.6,-21.6 21.6,-21.6 21.6,21.6 -21.6,21.6"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 613 B |
@@ -132,9 +132,13 @@ export const uploadToCloudinary = async (
|
|||||||
//Insert the document with the matching key.
|
//Insert the document with the matching key.
|
||||||
let takenat;
|
let takenat;
|
||||||
if (fileType.includes("image")) {
|
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({
|
const documentInsert = await client.mutate({
|
||||||
mutation: INSERT_NEW_DOCUMENT,
|
mutation: INSERT_NEW_DOCUMENT,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default function JobsDocumentsDeleteButton({
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
successfulDeletes.push(key);
|
successfulDeletes.push(key.replace(/\.[^/.]+$/, ""));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ exports.deleteFiles = async (req, res) => {
|
|||||||
//delete images returns.push(
|
//delete images returns.push(
|
||||||
returns.push(
|
returns.push(
|
||||||
await cloudinary.api.delete_resources(
|
await cloudinary.api.delete_resources(
|
||||||
types.raw.map((x) => x.key),
|
types.raw.map((x) => `${x.key}.${x.extension}`),
|
||||||
{ resource_type: "raw" }
|
{ resource_type: "raw" }
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user