Check filename extension for heic/heif images

This commit is contained in:
Josh Perez 2021-12-06 12:20:27 -05:00 committed by GitHub
parent 69edaeabfb
commit 5c8f740c2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View file

@ -82,7 +82,7 @@ export async function processAttachment(
let attachment: InMemoryAttachmentDraftType;
try {
if (isImageTypeSupported(fileType) || isHeic(fileType)) {
if (isImageTypeSupported(fileType) || isHeic(fileType, file.name)) {
attachment = await handleImageAttachment(file);
} else if (isVideoTypeSupported(fileType)) {
attachment = await handleVideoAttachment(file);