签名
build / build-push (push) Successful in 39s

This commit is contained in:
wanghu
2026-09-09 16:49:55 +08:00
parent 0efde94a74
commit 20325bed00
+2 -2
View File
@@ -222,7 +222,7 @@ namespace YhCore.Service.Impl
// 旧数据:相对路径如 /upload/docprint/20260101/{guid}.jpg(不含 FILE_PATH 前缀)→ StorageRoot + 子路径
var relative = fileUrl.TrimStart('/');
const string prefix = "upload/";
string prefix = Config.FilePath;
if (relative.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
relative = relative.Substring(prefix.Length);
@@ -236,7 +236,7 @@ namespace YhCore.Service.Impl
return Config.FilePath;
// 此分支仅在 FILE_PATH 未配置时执行(此时 Config.FilePath 为 null,不可再参与拼接)
return Path.Combine(AppContext.BaseDirectory, "upload");
return Path.Combine(AppContext.BaseDirectory, Config.FilePath);
}
}
}