Browse Source

fix: 增加大写FBX

liaoyitao 1 month ago
parent
commit
1316496be7

+ 1 - 1
src/main/java/com/lqkj/link/module/base/service/BaseService.java

@@ -92,7 +92,7 @@ public class BaseService {
92
     public String ossAddModel(MultipartFile file, String s) {
92
     public String ossAddModel(MultipartFile file, String s) {
93
         String fileName = file.getOriginalFilename();
93
         String fileName = file.getOriginalFilename();
94
         String suffix = fileName == null ? "" : fileName.substring(fileName.lastIndexOf(".") + 1);
94
         String suffix = fileName == null ? "" : fileName.substring(fileName.lastIndexOf(".") + 1);
95
-        if (!suffix.equals("obj") && !suffix.equals("fbx"))
95
+        if (!suffix.equals("obj") && !suffix.equals("fbx") && !suffix.equals("FBX"))
96
             throw new RuntimeException("上传文件类型必须是obj、fbx格式的压缩文件");
96
             throw new RuntimeException("上传文件类型必须是obj、fbx格式的压缩文件");
97
         if (aliOSSUtils.ossCheckCapacity(s) + file.getSize() >= 21474836480L)
97
         if (aliOSSUtils.ossCheckCapacity(s) + file.getSize() >= 21474836480L)
98
             throw new RuntimeException("容量已满,无法上传文件");
98
             throw new RuntimeException("容量已满,无法上传文件");