48 lines
1.8 KiB
Go
48 lines
1.8 KiB
Go
package dto
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"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:"本地路径"`
|
|
}
|
|
|
|
// DownloadToBrowserReq 下载文件到浏览器请求
|
|
type DownloadToBrowserReq struct {
|
|
g.Meta `path:"/downloadToBrowser" method:"post" tags:"存储管理" summary:"下载文件到浏览器" dc:"下载文件到浏览器"`
|
|
FileURL string `json:"fileURL" dc:"文件URL" in:"query"`
|
|
}
|
|
|
|
// UploadFileReq 上传文件请求
|
|
type UploadFileReq struct {
|
|
g.Meta `path:"/uploadFile" method:"post" tags:"存储管理" summary:"上传文件" dc:"上传文件"`
|
|
File *ghttp.UploadFile `json:"file" type:"file"` // 文件URL
|
|
}
|
|
|
|
type UploadFile struct {
|
|
TenantId uint64 `json:"tenantId"`
|
|
FileURL string `json:"fileURL"`
|
|
FileSize int `json:"fileSize"`
|
|
}
|
|
|
|
// UploadFileRes 上传文件响应
|
|
type UploadFileRes struct {
|
|
FileURL string `json:"fileURL" dc:"上传地址"`
|
|
FileSize int `json:"fileSize" dc:"文件大小"`
|
|
FileName string `json:"fileName" dc:"文件名称"`
|
|
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"`
|
|
}
|