|
|
@ -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<UploadImgResultDTO> 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()); |
|
|
|
} |
|
|
|