feat: 添加文件下载及字节流上传功能
This commit is contained in:
@@ -5,6 +5,12 @@ import (
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type DownloadToFileReq struct {
|
||||
g.Meta `path:"/downloadToFile" method:"post" tags:"存储管理" summary:"下载文件到本地" dc:"下载文件到本地"`
|
||||
FileURL string `json:"fileURL" dc:"文件URL"`
|
||||
LocalPath string `json:"localPath" dc:"本地路径"`
|
||||
}
|
||||
|
||||
// UploadFileReq 上传文件请求
|
||||
type UploadFileReq struct {
|
||||
g.Meta `path:"/uploadFile" method:"post" tags:"存储管理" summary:"上传文件" dc:"上传文件"`
|
||||
@@ -25,3 +31,11 @@ type UploadFileRes struct {
|
||||
FileFormat string `json:"fileFormat" dc:"文件格式"`
|
||||
FileAddressPrefix string `json:"fileAddressPrefix"`
|
||||
}
|
||||
|
||||
// UploadFileBytesReq 上传文件请求(字节流)
|
||||
type UploadFileBytesReq struct {
|
||||
g.Meta `path:"/uploadFileBytes" method:"post" tags:"存储管理" summary:"上传文件(字节流)" dc:"上传文件(字节流)"`
|
||||
FileName string `json:"fileName" dc:"文件名"`
|
||||
FileBytes []byte `json:"fileBytes" dc:"文件字节流"`
|
||||
FileStoreURL string `json:"fileStoreURL" dc:"文件存储的URL"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user