fix: Add stricter validation around image file type uploads (#3324)
* fix: Add stricter validation around image file type uploads * revert backend restrictions, we want to allow unsupported images as file attachments
This commit is contained in:
@@ -19,3 +19,21 @@ export const bytesToHumanReadable = (bytes: number) => {
|
||||
" kMGTPEZY"[out.length]
|
||||
}B`;
|
||||
};
|
||||
|
||||
/**
|
||||
* An array of image mimetypes commonly supported by modern browsers
|
||||
*/
|
||||
export const supportedImageMimeTypes = [
|
||||
"image/jpg",
|
||||
"image/jpeg",
|
||||
"image/pjpeg",
|
||||
"image/png",
|
||||
"image/apng",
|
||||
"image/avif",
|
||||
"image/gif",
|
||||
"image/webp",
|
||||
"image/svg",
|
||||
"image/svg+xml",
|
||||
"image/bmp",
|
||||
"image/tiff",
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user