feat: Add support for SVG mime type in file upload

This commit is contained in:
Simon Larsen 2024-09-06 11:33:11 +01:00
parent e3c68fdb4c
commit 0f58e16702
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ enum MimeType {
png = "image/png",
jpg = "image/jpeg",
jpeg = "image/jpeg",
svg = "image/svg+xml",
// TODO add more mime types.
}

View File

@ -514,7 +514,7 @@ const FormField: <T extends GenericObject>(
}}
mimeTypes={
props.field.fieldType === FormFieldSchemaType.ImageFile
? [MimeType.png, MimeType.jpeg, MimeType.jpg]
? [MimeType.png, MimeType.jpeg, MimeType.jpg, MimeType.svg]
: []
}
dataTestId={props.field.dataTestId}