updateSchema: Be resilient to invalid images

This commit is contained in:
Scott Nonnenberg
2022-07-05 17:28:00 -07:00
committed by GitHub
parent 5fcf97b43b
commit 064f3dd0e0
3 changed files with 44 additions and 23 deletions

View File

@@ -580,9 +580,13 @@ export const processNewAttachment = async (
throw new TypeError('context.logger is required');
}
const rotatedAttachment = await autoOrientJPEG(attachment, undefined, {
isIncoming: true,
});
const rotatedAttachment = await autoOrientJPEG(
attachment,
{ logger },
{
isIncoming: true,
}
);
const onDiskAttachment = await migrateDataToFileSystem(rotatedAttachment, {
writeNewAttachmentData,
});