|
@@ -320,6 +320,11 @@ public class TourismProjectTravelNotesWriteController {
|
|
|
@RequestParam String fieldName,
|
|
|
@RequestParam Boolean asImage,
|
|
|
@RequestParam("uploadFile") MultipartFile uploadFile) throws IOException {
|
|
|
+ if(uploadFile.getSize()>1024*1024*5){
|
|
|
+ ResponseResult.output(HttpServletResponse.SC_FORBIDDEN,
|
|
|
+ ResponseResult.error(ErrorCodeEnum.UPLOAD_FAILED, "文件大小不能超过5M"));
|
|
|
+ return;
|
|
|
+ }
|
|
|
UploadStoreInfo storeInfo = MyModelUtil.getUploadStoreInfo(TourismProjectTravelNotesWrite.class, fieldName);
|
|
|
// 这里就会判断参数中指定的字段,是否支持上传操作。
|
|
|
if (!storeInfo.isSupportUpload()) {
|