Attachments add more file extensions (#2803)

- add more file extensions
This commit is contained in:
brendanlaschke
2023-12-03 23:13:53 +01:00
committed by GitHub
parent 7e7bd6b9e7
commit de2f7212d1

View File

@ -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 => {