Accept JPEGs from certain Samsung phones with broken firmware

master
Manuel Kasper 2022-11-29 19:38:27 +01:00
rodzic d998de87c3
commit 91f7a7dbe8
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -123,9 +123,9 @@ function uploadToCloud(storageConfig, targetPath, buffer) {
}
function getMetadata(src) {
return sharp(src).metadata()
return sharp(src, { failOnError: false }).metadata()
}
function makeResized(src, maxWidth, maxHeight) {
return sharp(src).rotate().resize({ height: maxHeight, width: maxWidth, fit: 'inside' }).toBuffer()
return sharp(src, { failOnError: false }).rotate().resize({ height: maxHeight, width: maxWidth, fit: 'inside' }).toBuffer()
}