Commit 8855f3d8 authored by liyang's avatar liyang

fix: 在后端文件上传工具类中添加URL端口替换逻辑,将8882替换为8082

parent 5915e06c
...@@ -185,7 +185,10 @@ public class FileUploadUtils ...@@ -185,7 +185,10 @@ public class FileUploadUtils
String currentDir = StringUtils.substring(uploadDir, dirLastIndex); String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
// 替换反斜杠为正斜杠,确保路径格式正确 // 替换反斜杠为正斜杠,确保路径格式正确
currentDir = currentDir.replaceAll("\\\\", "/"); currentDir = currentDir.replaceAll("\\\\", "/");
return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; String url = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
// 将URL中的8882端口替换为8082
url = url.replace(":8882", ":8082");
return url;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment