Content type 'multipart/form-data;boundary=----...;charset=UTF-8' not supported Content type 'multipart/form-data;boundary=----...;charset=UTF-8' not supported spring spring

Content type 'multipart/form-data;boundary=----...;charset=UTF-8' not supported


As said dknight @RequestBody means use of JSON or XML data with maps your DTO bean.In case of MultipartFile you can't use JSON data so you can't use @RequestBody.Try with @ModelAttribute annotation.

Working sample :

@PostMapping("/promoters")@Timedpublic ResponseEntity<PromoterDTO> createPromoter(@ModelAttribute PromoterDTO promoterDTO) throws URISyntaxException { ... }

With PromoterDTO like this :

    public class PromoterDTO implements Serializable {        private Long id;         private String name;        private String address;        private MultipartFile logo;    }


In Postman, you need to set the body to be of type raw, and from the drop down you can select JSON, I had a similar issue, this fixed my issue.

view screen here


Instead of @RequestBody, use @RequestParam!