fix bug:Admin upload image should support format GIF, SVG to update logo

This commit is contained in:
Liujian committed 2025-12-05 11:02:07 +09:00
1 parent 6561435a38
commit e2ae502b48
1 file changed
+1 -1
+1 -1
View File
@@ -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)