Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
fix(backend:common): prevent errors on invalid image metadata with `failOn: 'none'` option in sharp
johaven901fdf8cf9ed
diff --git a/backend/src/common/image.ts b/backend/src/common/image.tsindex f17c2b14..850784b5 100644--- a/backend/src/common/image.ts+++ b/backend/src/common/image.ts@@ -27,6 +27,7 @@ let textToSvgCache: Promise<TextToSVG> | null = nullexport async function generateThumbnail(filePath: string, size: number): Promise<Readable> {return sharp(filePath, {+ failOn: 'none',sequentialRead: true, // sequential read = more efficient I/OlimitInputPixels: 268e6 // protects against extremely large images})