Add catch statement for samsung images.

This commit is contained in:
Patrick Fic
2023-03-28 15:15:08 -07:00
parent 72330f2341
commit a678383dee
2 changed files with 5 additions and 2 deletions

View File

@@ -1,9 +1,9 @@
{ {
"name": "bodyshop-media-server", "name": "bodyshop-media-server",
"version": "1.0.8", "version": "1.0.10",
"license": "UNLICENSED", "license": "UNLICENSED",
"engines": { "engines": {
"node": "16.15.0" "node": "^16.14.0"
}, },
"scripts": { "scripts": {
"server": "nodemon server.ts", "server": "nodemon server.ts",

View File

@@ -48,10 +48,13 @@ export default async function GenerateThumbnail(
}); });
} else { } else {
logger.debug("Thumbnail being created for : " + thumbPath); logger.debug("Thumbnail being created for : " + thumbPath);
//Ignoring typescript as the interface is lacking a parameter.
// @ts-ignore
const thumbnail = await imageThumbnail(file, { const thumbnail = await imageThumbnail(file, {
responseType: "buffer", responseType: "buffer",
height: 250, height: 250,
width: 250, width: 250,
failOnError: false,
}); });
console.log("Image success."); console.log("Image success.");
await fs.writeFile(thumbPath, thumbnail); await fs.writeFile(thumbPath, thumbnail);