mirror of
https://github.com/quarkcloudio/quark-go.git
synced 2025-09-26 20:11:11 +08:00
feat: 图片上传允许上传svg
This commit is contained in:
@@ -30,6 +30,7 @@ func (p *Image) Init(ctx *builder.Context) interface{} {
|
||||
"image/png",
|
||||
"image/gif",
|
||||
"image/jpeg",
|
||||
"image/svg+xml",
|
||||
}
|
||||
|
||||
// 设置文件上传路径
|
||||
|
@@ -24,6 +24,7 @@ func (p *Image) Init(ctx *builder.Context) interface{} {
|
||||
"image/png",
|
||||
"image/gif",
|
||||
"image/jpeg",
|
||||
"image/svg+xml",
|
||||
}
|
||||
|
||||
// 设置文件上传路径
|
||||
|
@@ -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",
|
||||
|
Reference in New Issue
Block a user