feat: 图片上传允许上传svg

This commit is contained in:
WANGZeping
2024-08-27 10:49:41 +08:00
parent 4c6b7132b1
commit 9908c4be63
3 changed files with 3 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ func (p *Image) Init(ctx *builder.Context) interface{} {
"image/png",
"image/gif",
"image/jpeg",
"image/svg+xml",
}
// 设置文件上传路径

View File

@@ -24,6 +24,7 @@ func (p *Image) Init(ctx *builder.Context) interface{} {
"image/png",
"image/gif",
"image/jpeg",
"image/svg+xml",
}
// 设置文件上传路径

View File

@@ -51,6 +51,7 @@ var ContentTypeList = map[string]string{
"image/jpeg": "jpg",
"image/x-ms-bmp": "bmp",
"image/x-icon": "ico",
"image/svg+xml": "svg",
"image/x-cursor": "cur",
"image/vnd.adobe.photoshop": "pnd",
"image/png": "png",