fix: 绝对路径转换去除双斜杠,避免Linux系统下出现错误
This commit is contained in:
1 parent
deba4ca564
commit
70eb6fa5ce
1 file changed
+2
-1
@@ -351,5 +351,6 @@ func ParseUploadFileDir(subPath string) string {
|
|||||||
// filePath 上传文件路径
|
// filePath 上传文件路径
|
||||||
func ParseUploadFilePath(filePath string) string {
|
func ParseUploadFilePath(filePath string) string {
|
||||||
prefix, dir := resourceUpload()
|
prefix, dir := resourceUpload()
|
||||||
return strings.Replace(filePath, prefix, dir, 1)
|
absPath := strings.Replace(filePath, prefix, dir, 1)
|
||||||
|
return filepath.ToSlash(absPath)
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user