Forráskód Böngészése

Merge remote-tracking branch 'origin/dev-api' into dev-api

# Conflicts:
#	ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/UploadController.java
limingming 1 éve
szülő
commit
a62f86b9b4

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/UploadController.java

@@ -30,7 +30,7 @@ public class UploadController {
         UploadInfo uploadInfo = new UploadInfo();
 
 //        uploadInfo.setFileName(fileName);
-        uploadInfo.setUrl(filePath+fileNewName);
+        uploadInfo.setUrl(fileNewName);
 
         //返回文件名 和存放路径
         return R.ok(uploadInfo);

+ 5 - 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java

@@ -145,6 +145,11 @@ public class Constants
     public static final String RESOURCE_PREFIX = "/profile";
 
     /**
+     * 资源映射路径 前缀
+     */
+    public static final String UPLOADPATH = "/uploadPath";
+
+    /**
      * RMI 远程方法调用
      */
     public static final String LOOKUP_RMI = "rmi:";

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java

@@ -144,7 +144,7 @@ public class FileUploadUtils
     {
         int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
         String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
-        return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
+        return Constants.UPLOADPATH + "/" + currentDir + "/" + fileName;
     }
 
     /**