diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index 5664533b48..4773af928c 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -281,6 +281,7 @@ public class OssController { public Result uploadVariedFile(@RequestParam("file") MultipartFile file) { String fileName = file.getOriginalFilename(); String format = "-" + fileName.substring(fileName.lastIndexOf(".") + NumConstant.ONE) + "-"; + format = format.toLowerCase(); //1.校验上传文件类型 if (!ModuleConstant.PROJECT_FILE_CONTENT.contains(format)) { log.error(String.format("上传文件类型格式错误,暂不支持此类文件上传,文件名->%s", fileName));