Tutorial by Examples

To receive a file uploaded via an HTTP Post, you need to do the following: @RequestMapping( value = "...", method = RequestMethod.POST, consumes = MediaType.MULTIPART_FORM_DATA_VALUE ) public Object uploadFile( @RequestPart MultipartFile file ) { String fileNam...
To receive multiple files uploaded via a single HTTP Post, you need to do the following: @RequestMapping( value = "...", method = RequestMethod.POST, consumes = MediaType.MULTIPART_FORM_DATA_VALUE ) public Object uploadFile( @RequestPart MultipartFile[] files ) { ...
It is possible to upload multiple parts, each with a different name. For each part name, you will need one parameter annotated with @RequestPart, whose name matches the part name. To receive a file uploaded via an HTTP Post, you need to do the following: @RequestMapping( value = "...&quo...
If you want to convert the content of a part into a domain object (e.g. a User or Account or Address), then the process is very simple: It is possible to upload multiple parts, each with a different name. For each part name, you will need one parameter annotated with @RequestPart, whose name matche...

Page 1 of 1