durow/UEditorNetCore

你好 关于WebRootPath多于一个文件夹时,就无法保存了

Opened this issue · 1 comments

经过调试WebRootPath多于一个文件夹时,就无法保存了,
Path.Combine(Config.WebRootPath, savePath); 此时结果就还是相对路径 /UploadFiles/xxx/xxx.jpg
Path.Combine用法好但其实也有坑

我在Config中加了GetMapPath方法 ,应该好用一点
public static string GetMapPath(string filePath)
{
return $"{WebRootPath}\{filePath.TrimStart('/').Replace("/", "\")}";
}