|
@@ -45,8 +45,8 @@ public class BaseService {
|
45
|
45
|
public MessageBean<String> uploadModelCompress(MultipartFile file, String path) {
|
46
|
46
|
String fileName = file.getOriginalFilename();
|
47
|
47
|
String suffix = fileName == null ? "" : fileName.substring(fileName.lastIndexOf(".") + 1);
|
48
|
|
- if (!suffix.equals("zip") || !suffix.equals("rar")) {
|
49
|
|
- return MessageBean.error("上传文件类型必须是zip、rar格式的模型文件");
|
|
48
|
+ if (!suffix.equals("zip")) {
|
|
49
|
+ return MessageBean.error("上传文件类型必须是zip格式的模型文件");
|
50
|
50
|
}
|
51
|
51
|
String newFileName = UUID.randomUUID() + "." + suffix;
|
52
|
52
|
String filePath = "./upload/" + path;
|