feat: 添加下载文件到浏览器功能

This commit is contained in:
2026-04-22 12:49:27 +08:00
parent 98f0082d44
commit 3055b15855
4 changed files with 74 additions and 0 deletions

View File

@@ -22,6 +22,12 @@ func (c *file) DownloadToFile(ctx context.Context, req *dto.DownloadToFileReq) (
return
}
// DownloadToBrowser 下载文件到浏览器
func (c *file) DownloadToBrowser(ctx context.Context, req *dto.DownloadToBrowserReq) (res *beans.ResponseEmpty, err error) {
err = service.File.DownloadToBrowser(ctx, req)
return
}
// UploadFile 上传文件
func (c *file) UploadFile(ctx context.Context, req *dto.UploadFileReq) (res *dto.UploadFileRes, err error) {
return service.File.UploadFile(ctx, req)