处理问题

This commit is contained in:
wanggeng 2022-09-08 10:02:12 +08:00
parent 06b63594b8
commit f1b4307535

View File

@ -87,6 +87,9 @@ public class FileComponent {
*/
public String getFileUrl(String uploadPath) {
String fileUrl = uploadPath.replace(fileProperties.getUploadPath(), "");
if ("\\".equals(File.separator)) {
fileUrl = fileUrl.replace("\\", "/");
}
if (fileUrl.startsWith("/")) {
fileUrl = fileUrl.substring(1);
}