Add catch statement for samsung images.
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user