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

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