作者 RuoYi

修复文件上传多级目录识别问题

@@ -146,7 +146,7 @@ public class FileUploadUtils @@ -146,7 +146,7 @@ public class FileUploadUtils
146 146
147 private static final String getPathFileName(String uploadDir, String fileName) throws IOException 147 private static final String getPathFileName(String uploadDir, String fileName) throws IOException
148 { 148 {
149 - int dirLastIndex = uploadDir.lastIndexOf("/") + 1; 149 + int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
150 String currentDir = StringUtils.substring(uploadDir, dirLastIndex); 150 String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
151 String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; 151 String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
152 return pathFileName; 152 return pathFileName;