|
|
@ -158,7 +158,7 @@ public class OssController { |
|
|
|
*/ |
|
|
|
@PostMapping("compressuploadimg") |
|
|
|
public Result<UploadImgResultDTO> compressUploadImg(@RequestParam("file") MultipartFile file) { |
|
|
|
return ossService.compressUploadImg(file, null); |
|
|
|
return ossService.compressUploadImg(file, null,200L); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("uploadwximg") |
|
|
@ -410,7 +410,11 @@ public class OssController { |
|
|
|
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode() |
|
|
|
, EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
//如果图片大于2M压缩一下
|
|
|
|
int compressSize = 2 * 1024 * 1024; |
|
|
|
if(file.getSize()>compressSize){ |
|
|
|
return ossService.compressUploadImg(file, null,2 * 1024); |
|
|
|
} |
|
|
|
return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId); |
|
|
|
} |
|
|
|
|
|
|
|