Don't transcode incoming attachments

This commit is contained in:
Fedor Indutny 2021-07-20 12:31:23 -07:00 committed by GitHub
parent 183db8a074
commit e534dd64f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

View file

@ -458,7 +458,11 @@ exports.processNewAttachment = async (
throw new TypeError('context.logger is required');
}
const rotatedAttachment = await Attachment.autoOrientJPEG(attachment);
const rotatedAttachment = await Attachment.autoOrientJPEG(
attachment,
undefined,
{ isIncoming: true }
);
const onDiskAttachment = await Attachment.migrateDataToFileSystem(
rotatedAttachment,
{ writeNewAttachmentData }