From 85c17f4563d37cd94c4f5b6b7b4e39e33bd78368 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 1 Nov 2019 09:33:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=A4=9A=E7=BA=A7=E7=9B=AE=E5=BD=95=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/utils/file/FileUploadUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java b/ruoyi/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java index 48d3ada8..6921fea7 100644 --- a/ruoyi/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java @@ -146,7 +146,7 @@ public class FileUploadUtils private static final String getPathFileName(String uploadDir, String fileName) throws IOException { - int dirLastIndex = uploadDir.lastIndexOf("/") + 1; + int dirLastIndex = RuoYiConfig.getProfile().length() + 1; String currentDir = StringUtils.substring(uploadDir, dirLastIndex); String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; return pathFileName;