From 5c679fcf64b91dd466852e27f301adff2b75e21a Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:34:19 -0500 Subject: [PATCH] Fix heic/heif extension name case sensitivity Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> --- ts/types/MIME.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/types/MIME.ts b/ts/types/MIME.ts index 674579feab..bf5068eb31 100644 --- a/ts/types/MIME.ts +++ b/ts/types/MIME.ts @@ -32,8 +32,8 @@ export const TEXT_ATTACHMENT = stringToMIMEType('text/x-signal-story'); export const isHeic = (value: string, fileName: string): boolean => value === 'image/heic' || value === 'image/heif' || - fileName.endsWith('.heic') || - fileName.endsWith('.heif'); + fileName.toLowerCase().endsWith('.heic') || + fileName.toLowerCase().endsWith('.heif'); export const isGif = (value: string): value is MIMEType => value === 'image/gif'; export const isJPEG = (value: string): value is MIMEType =>