实现图片上传到oss
This commit is contained in:
14
api/upload/v1/upload.go
Normal file
14
api/upload/v1/upload.go
Normal file
@ -0,0 +1,14 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type UploadReq struct {
|
||||
g.Meta `path:"/upload/image" method:"post" tags:"WEB" summary:"上传文件"`
|
||||
File *ghttp.UploadFile `json:"file"`
|
||||
}
|
||||
type UploadRes struct {
|
||||
Url string `json:"url"`
|
||||
}
|
||||
Reference in New Issue
Block a user