2025-12-26 13:59:02 +08:00
|
|
|
package dto
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
|
|
|
)
|
|
|
|
|
|
2026-04-22 08:45:45 +08:00
|
|
|
type DownloadToFileReq struct {
|
|
|
|
|
g.Meta `path:"/downloadToFile" method:"post" tags:"存储管理" summary:"下载文件到本地" dc:"下载文件到本地"`
|
|
|
|
|
FileURL string `json:"fileURL" dc:"文件URL"`
|
|
|
|
|
LocalPath string `json:"localPath" dc:"本地路径"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-22 12:49:27 +08:00
|
|
|
// DownloadToBrowserReq 下载文件到浏览器请求
|
|
|
|
|
type DownloadToBrowserReq struct {
|
|
|
|
|
g.Meta `path:"/downloadToBrowser" method:"post" tags:"存储管理" summary:"下载文件到浏览器" dc:"下载文件到浏览器"`
|
|
|
|
|
FileURL string `json:"fileURL" dc:"文件URL" in:"query"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-11 09:14:45 +08:00
|
|
|
type DeleteFileReq struct {
|
|
|
|
|
g.Meta `path:"/deleteFile" method:"post" tags:"存储管理" summary:"删除文件" dc:"删除文件"`
|
|
|
|
|
FileURL string `json:"fileUrl" dc:"文件URL"` // 文件URL
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-26 13:59:02 +08:00
|
|
|
// UploadFileReq 上传文件请求
|
|
|
|
|
type UploadFileReq struct {
|
|
|
|
|
g.Meta `path:"/uploadFile" method:"post" tags:"存储管理" summary:"上传文件" dc:"上传文件"`
|
2026-06-11 09:14:45 +08:00
|
|
|
File *ghttp.UploadFile `json:"file" type:"file"` // 文件URL
|
|
|
|
|
Files *ghttp.UploadFiles `json:"files" type:"files"` // 文件URL
|
2025-12-26 13:59:02 +08:00
|
|
|
}
|
|
|
|
|
|
2026-03-18 13:17:59 +08:00
|
|
|
type UploadFile struct {
|
|
|
|
|
TenantId uint64 `json:"tenantId"`
|
|
|
|
|
FileURL string `json:"fileURL"`
|
|
|
|
|
FileSize int `json:"fileSize"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-26 13:59:02 +08:00
|
|
|
// UploadFileRes 上传文件响应
|
|
|
|
|
type UploadFileRes struct {
|
2026-06-11 09:14:45 +08:00
|
|
|
FileURL string `json:"fileURL" dc:"上传地址"`
|
|
|
|
|
FileSize int `json:"fileSize" dc:"文件大小"`
|
|
|
|
|
FileName string `json:"fileName" dc:"文件名称"`
|
|
|
|
|
FileFormat string `json:"fileFormat" dc:"文件格式"`
|
|
|
|
|
FileAddressPrefix string `json:"fileAddressPrefix"`
|
|
|
|
|
Items []*UploadFileRes `json:"files"`
|
2026-04-22 08:45:45 +08:00
|
|
|
}
|