Signed-off-by: 吴文峰 <kevin@lmve.net>
This commit is contained in:
2026-01-13 21:08:19 +08:00
parent 3acc19ffd8
commit 0b67a9bf09
16 changed files with 420 additions and 117 deletions
+10
View File
@@ -22,3 +22,13 @@ func ReturnJson(ctx *gin.Context, errMsg string, data map[string]interface{}) {
//ctx.Abort()
}
func Return_file(ctx *gin.Context, file_path string, preview bool) {
if preview {
ctx.File(file_path)
} else {
//需要从数据库拉取原始文件名
//ctx.FileAttachment(file_info.Path, file_info.Name)
}
}