fix: 文件识别工具

This commit is contained in:
TsMask
2024-08-31 14:23:46 +08:00
parent ead841c26d
commit ef704d36e3
2 changed files with 51 additions and 1 deletions

View File

@@ -351,5 +351,6 @@ func ParseUploadFileDir(subPath string) string {
// filePath 上传文件路径
func ParseUploadFilePath(filePath string) string {
prefix, dir := resourceUpload()
return strings.Replace(filePath, prefix, dir, 1)
absPath := strings.Replace(filePath, prefix, dir, 1)
return filepath.ToSlash(absPath)
}