Attachments add more file extensions (#2803)
- add more file extensions
This commit is contained in:
@ -10,6 +10,9 @@ const FileExtensionMapping: { [key: string]: AttachmentType } = {
|
|||||||
pdf: 'TextDocument',
|
pdf: 'TextDocument',
|
||||||
txt: 'TextDocument',
|
txt: 'TextDocument',
|
||||||
rtf: 'TextDocument',
|
rtf: 'TextDocument',
|
||||||
|
ps: 'TextDocument',
|
||||||
|
tex: 'TextDocument',
|
||||||
|
pages: 'TextDocument',
|
||||||
xls: 'Spreadsheet',
|
xls: 'Spreadsheet',
|
||||||
xlsb: 'Spreadsheet',
|
xlsb: 'Spreadsheet',
|
||||||
xlsm: 'Spreadsheet',
|
xlsm: 'Spreadsheet',
|
||||||
@ -18,11 +21,14 @@ const FileExtensionMapping: { [key: string]: AttachmentType } = {
|
|||||||
csv: 'Spreadsheet',
|
csv: 'Spreadsheet',
|
||||||
tsv: 'Spreadsheet',
|
tsv: 'Spreadsheet',
|
||||||
ods: 'Spreadsheet',
|
ods: 'Spreadsheet',
|
||||||
|
numbers: 'Spreadsheet',
|
||||||
ppt: 'Presentation',
|
ppt: 'Presentation',
|
||||||
pptx: 'Presentation',
|
pptx: 'Presentation',
|
||||||
potx: 'Presentation',
|
potx: 'Presentation',
|
||||||
odp: 'Presentation',
|
odp: 'Presentation',
|
||||||
html: 'Presentation',
|
html: 'Presentation',
|
||||||
|
key: 'Presentation',
|
||||||
|
kth: 'Presentation',
|
||||||
png: 'Image',
|
png: 'Image',
|
||||||
jpg: 'Image',
|
jpg: 'Image',
|
||||||
jpeg: 'Image',
|
jpeg: 'Image',
|
||||||
@ -33,6 +39,7 @@ const FileExtensionMapping: { [key: string]: AttachmentType } = {
|
|||||||
tif: 'Image',
|
tif: 'Image',
|
||||||
tiff: 'Image',
|
tiff: 'Image',
|
||||||
bmp: 'Image',
|
bmp: 'Image',
|
||||||
|
ico: 'Image',
|
||||||
mp4: 'Video',
|
mp4: 'Video',
|
||||||
avi: 'Video',
|
avi: 'Video',
|
||||||
mov: 'Video',
|
mov: 'Video',
|
||||||
@ -40,10 +47,15 @@ const FileExtensionMapping: { [key: string]: AttachmentType } = {
|
|||||||
mpg: 'Video',
|
mpg: 'Video',
|
||||||
mpeg: 'Video',
|
mpeg: 'Video',
|
||||||
mp3: 'Audio',
|
mp3: 'Audio',
|
||||||
|
wav: 'Audio',
|
||||||
|
ogg: 'Audio',
|
||||||
|
wma: 'Audio',
|
||||||
zip: 'Archive',
|
zip: 'Archive',
|
||||||
tar: 'Archive',
|
tar: 'Archive',
|
||||||
iso: 'Archive',
|
iso: 'Archive',
|
||||||
gz: 'Archive',
|
gz: 'Archive',
|
||||||
|
rar: 'Archive',
|
||||||
|
'7z': 'Archive',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getFileType = (fileName: string): AttachmentType => {
|
export const getFileType = (fileName: string): AttachmentType => {
|
||||||
|
|||||||
Reference in New Issue
Block a user