From bbfa8d3c139a39a5bdfaa59d75deac6c21a7a885 Mon Sep 17 00:00:00 2001 From: cjy Date: Mon, 9 Mar 2026 09:38:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Aurl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/cast/report.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/service/cast/report.go b/pkg/service/cast/report.go index b64b5af2..3b339b73 100644 --- a/pkg/service/cast/report.go +++ b/pkg/service/cast/report.go @@ -1444,8 +1444,8 @@ func ImportPdfBatch(ctx *gin.Context) { continue } - // 下载 PDF - fullPath, err := utils.SaveUrlFileDisk(pdfUrl, "runtime/pdf_import/", newFileName+".pdf") + // 下载 PDF(保存到 runtime 目录,上传后 URL 不包含 pdf_import 路径) + fullPath, err := utils.SaveUrlFileDisk(pdfUrl, "runtime/", newFileName+".pdf") if err != nil { zap.L().Error("下载PDF失败", zap.String("pdfUrl", pdfUrl), zap.Error(err)) excelData.SetCellValue("Sheet1", fmt.Sprintf("D%d", line+1), fmt.Sprintf("下载PDF失败: %s", err.Error()))