소스 검색

下载于hash

lyhzzz 3 달 전
부모
커밋
c91eb674cc
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/main/java/com/fdkankan/fusion/controller/DictFileController.java

+ 3 - 2
src/main/java/com/fdkankan/fusion/controller/DictFileController.java

@@ -99,8 +99,9 @@ public class DictFileController extends BaseController{
             return ResultData.ok(commonUpload.getFileUrl());
         }
         if("obj".equals(commonUpload.getFileFormat()) || "osgb".equals(commonUpload.getFileFormat()) || "b3dm".equals(commonUpload.getFileFormat())){
-            sceneObjPath = new File(sceneObjPath).getParentFile().getPath();
-            foName =  new File(sceneObjPath).getParentFile().getName();
+            File parentFile = new File(sceneObjPath).getParentFile();
+            sceneObjPath = parentFile.getPath();
+            foName =  parentFile.getName();
         }
 
         String filePath = String.format(CacheUtil.basePath+"/" +OssPath.MANAGE_FILE_DOWN_PATH ,dictFileId) ;