The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Attachments add more file extensions (#2803)
brendanlaschkede2f7212d1b4
diff --git a/front/src/modules/activities/files/utils/getFileType.ts b/front/src/modules/activities/files/utils/getFileType.tsindex a90a29efb26..a06b04cbc1a 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 => {