I wrote a controller as below:
@PostMapping(value="/upload", produces = "application/json")
@ApiOperation("Upload")
@ApiIgnore
public ResponseEntity<ResponseObject> fileUpload(
@RequestParam(value="file") MultipartFile file,
@RequestParam (value="code",required=false, defaultValue="0")String code,
@RequestParam (value="approvaldetails",required=false, defaultValue="0") String approvalDeatils) throws Exception{
return uploadService.uploader(file,code,approvalDeatils);
}
and I configured below at application.porperties:
spring.servlet.multipart.max-file-size=30MB
spring.servlet.multipart.max-request-size=30MB
but I could able to upload file up to ~15MB Editted: Spring boot version: 2.0.1