From de2f7212d1b49c32c31f552406eeb735166deb14 Mon Sep 17 00:00:00 2001 From: brendanlaschke Date: Sun, 3 Dec 2023 23:13:53 +0100 Subject: [PATCH] Attachments add more file extensions (#2803) - add more file extensions --- .../modules/activities/files/utils/getFileType.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/front/src/modules/activities/files/utils/getFileType.ts b/front/src/modules/activities/files/utils/getFileType.ts index a90a29efb..a06b04cbc 100644 --- a/front/src/modules/activities/files/utils/getFileType.ts +++ b/front/src/modules/activities/files/utils/getFileType.ts @@ -10,6 +10,9 @@ const FileExtensionMapping: { [key: string]: AttachmentType } = { pdf: 'TextDocument', txt: 'TextDocument', rtf: 'TextDocument', + ps: 'TextDocument', + tex: 'TextDocument', + pages: 'TextDocument', xls: 'Spreadsheet', xlsb: 'Spreadsheet', xlsm: 'Spreadsheet', @@ -18,11 +21,14 @@ const FileExtensionMapping: { [key: string]: AttachmentType } = { csv: 'Spreadsheet', tsv: 'Spreadsheet', ods: 'Spreadsheet', + numbers: 'Spreadsheet', ppt: 'Presentation', pptx: 'Presentation', potx: 'Presentation', odp: 'Presentation', html: 'Presentation', + key: 'Presentation', + kth: 'Presentation', png: 'Image', jpg: 'Image', jpeg: 'Image', @@ -33,6 +39,7 @@ const FileExtensionMapping: { [key: string]: AttachmentType } = { tif: 'Image', tiff: 'Image', bmp: 'Image', + ico: 'Image', mp4: 'Video', avi: 'Video', mov: 'Video', @@ -40,10 +47,15 @@ const FileExtensionMapping: { [key: string]: AttachmentType } = { mpg: 'Video', mpeg: 'Video', mp3: 'Audio', + wav: 'Audio', + ogg: 'Audio', + wma: 'Audio', zip: 'Archive', tar: 'Archive', iso: 'Archive', gz: 'Archive', + rar: 'Archive', + '7z': 'Archive', }; export const getFileType = (fileName: string): AttachmentType => {