From 06b63594b8ba0715637832ae671d64dfed97c01c Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Wed, 7 Sep 2022 23:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/ink/wgink/module/file/components/FileComponent.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/module-file/src/main/java/ink/wgink/module/file/components/FileComponent.java b/module-file/src/main/java/ink/wgink/module/file/components/FileComponent.java index b2d14605..ec9fdb69 100644 --- a/module-file/src/main/java/ink/wgink/module/file/components/FileComponent.java +++ b/module-file/src/main/java/ink/wgink/module/file/components/FileComponent.java @@ -87,11 +87,8 @@ 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, fileUrl.length() - 1); + fileUrl = fileUrl.substring(1); } return "files/" + fileUrl; }