As I am trying this with spring boot and webservices with postman chrome add-ons.
In postman content-type=\"multipart/form-data\"
and I am getting the b
The problem is that you are setting the Content-Type
by yourself, let it be blank. Google Chrome will do it for you. The multipart Content-Type
needs to know the file boundary, and when you remove the Content-Type
, Postman will do it automagically for you.
The "Postman - REST Client" is not suitable for doing post action with setting content-type.You can try to use "Advanced REST client" or others.
Additionally, headers was replace by consumes and produces since Spring 3.1 M2, see https://spring.io/blog/2011/06/13/spring-3-1-m2-spring-mvc-enhancements. And you can directly use produces = MediaType.MULTIPART_FORM_DATA_VALUE
.
Heard you can do this in postman: