From 078ee5e72b9f0463f5c68324711894ab9ea8fc6f Mon Sep 17 00:00:00 2001 From: easrng Date: Fri, 14 Nov 2025 20:59:48 -0700 Subject: [PATCH] improve content type to extension logic --- ts/util/Attachment.std.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/util/Attachment.std.ts b/ts/util/Attachment.std.ts index 355890a753..631612bc88 100644 --- a/ts/util/Attachment.std.ts +++ b/ts/util/Attachment.std.ts @@ -772,7 +772,7 @@ export const getFileExtension = ( case 'audio/mpeg': return 'mp3'; default: - return attachment.contentType.split('/')[1]; + return attachment.contentType.split('/')[1].split(/[+;\s]/)[0]; } };