fix: substitution of content when sending an image to a profile (#3869)

* fix: Limit public uploads to basic image types

* test
This commit is contained in:
Tom Moor
2022-07-26 20:10:00 +01:00
committed by GitHub
parent 086c3ec2d8
commit 8fdd5bf734
9 changed files with 82 additions and 34 deletions

View File

@@ -1,3 +1,24 @@
export const AttachmentValidation = {
/** The limited allowable mime-types for user and team avatars */
avatarContentTypes: ["image/jpg", "image/jpeg", "image/png"],
/** Image mime-types commonly supported by modern browsers */
imageContentTypes: [
"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",
],
};
export const CollectionValidation = {
/** The maximum length of the collection description */
maxDescriptionLength: 1000,