Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-09 18:01:25 +08:00
parent a15494c3f3
commit ff72ff1f27
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -269,6 +269,11 @@ func serveExport(ginServer *gin.Engine) {
// 应下载而不是查看导出的文件
exportGroup.GET("/*filepath", func(c *gin.Context) {
if strings.HasPrefix(c.Request.URL.Path, "/export/temp/") {
c.File(filepath.Join(util.TempDir, c.Request.URL.Path))
return
}
filePath := strings.TrimPrefix(c.Request.URL.Path, "/export/")
decodedPath, err := url.PathUnescape(filePath)