The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/lib/getImageExtensionFromMime.ts

14 lines
377 B

const extensionsMap: Record<string, string> = {
'image/apng': 'apng',
'image/avif': 'avif',
'image/gif': 'gif',
'image/jpeg': 'jpg',
'image/png': 'png',
'image/svg+xml': 'svg',
'image/webp': 'webp',
'image/bmp': 'bmp',
'image/x-icon': 'ico',
'image/tiff': 'tif',
};
export const getImageExtensionFromMime = (mime: string): string | undefined => extensionsMap[mime];