fix bug:Admin upload image should support format GIF, SVG to update logo
This commit is contained in:
1 parent
6561435a38
commit
e2ae502b48
1 file changed
+1
-1
@@ -35,7 +35,7 @@ async def upload(
|
||||
filename = os.path.basename(filename)
|
||||
|
||||
# enforce content type and size limits
|
||||
allowed_types = {"image/jpeg", "image/png", "image/webp"}
|
||||
allowed_types = {"image/jpeg", "image/png", "image/webp", "image/gif", "image/svg+xml"}
|
||||
if img.content_type not in allowed_types:
|
||||
return ResponseUtils.error(message="Unsupported file type", code=400)
|
||||
|
||||
|
||||
Reference in new issue
Block a user