From 51ad6b41ea7720758b9126b2b1a30a466077223d Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 9 Jun 2020 10:29:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/OssController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 9b8419b384..ba393cba85 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 @@ -55,7 +55,6 @@ public class OssController { private ParamsRemoteService paramsRemoteService; private final static String KEY = ModuleConstant.CLOUD_STORAGE_CONFIG_KEY; - public static final String IMAGE_JPG_VALUE = "image/jpg"; @GetMapping("page") @ApiOperation(value = "分页") @@ -191,7 +190,7 @@ public class OssController { public Result uploadArticleImg(@RequestParam("file") MultipartFile file) { // 校验文件类型 - if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType()) && !IMAGE_JPG_VALUE.equals(file.getContentType())) { + if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType()) && !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType())) { throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode() , EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg()); }