From d6472f08765918b62fe2b373e7998101f5244678 Mon Sep 17 00:00:00 2001 From: b4sh2 <58754382+b4sh2@users.noreply.github.com> Date: Fri, 20 Feb 2026 17:59:44 +0100 Subject: [PATCH] Merge commit from fork Co-authored-by: b4sh2 --- apps/server/src/core/attachment/attachment.utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/server/src/core/attachment/attachment.utils.ts b/apps/server/src/core/attachment/attachment.utils.ts index 8f24e765..0bddee1a 100644 --- a/apps/server/src/core/attachment/attachment.utils.ts +++ b/apps/server/src/core/attachment/attachment.utils.ts @@ -2,6 +2,7 @@ import { MultipartFile } from '@fastify/multipart'; import * as path from 'path'; import { AttachmentType } from './attachment.constants'; import { sanitizeFileName } from '../../common/helpers'; +import { getMimeType } from '../../common/helpers/file.helper'; export interface PreparedFile { buffer?: Buffer; @@ -40,7 +41,7 @@ export async function prepareFile( fileName, fileSize, fileExtension, - mimeType: file.mimetype, + mimeType: getMimeType(file.originalname), multiPartFile: file, }; } catch (error) {