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()))