Add catch statement for samsung images.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "bodyshop-media-server",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.10",
|
||||
"license": "UNLICENSED",
|
||||
"engines": {
|
||||
"node": "16.15.0"
|
||||
"node": "^16.14.0"
|
||||
},
|
||||
"scripts": {
|
||||
"server": "nodemon server.ts",
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user