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:
Tom Moor
2022-04-01 19:26:27 -07:00
committed by GitHub
parent aa05b483fd
commit fde053ebc8
3 changed files with 22 additions and 2 deletions

View File

@@ -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",
];