소스 검색

oss获取url的路径替换bug

chenr 5 달 전
부모
커밋
670e634d07
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java

@@ -360,7 +360,7 @@ public class FileUtils {
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         String file_path2 = getSysLocalFileUrl();
         String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
-        if(fileUrl.indexOf("/www/wwwroot")>=0){
+        if(fileUrl.indexOf("/www/wwwroot")>=0 || fileUrl.indexOf("/mnt/sdc/Users/hongchuangyanfa/Desktop/")>=0){
             file_path2 = file_path;
         }
         String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path2, "");