I want to receive multi-part image file with request body data, but could not able to figure it out, why it is throwing org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/octet-stream'
not supported exception
Below is my implementation
public ResponseEntity<GlobalResponse> createUser(@Valid @RequestPart("json") UserDTO userDTO ,@RequestPart(value ="file", required=false)MultipartFile file) throws IOException {
//Calling some service
return new ResponseEntity<>( HttpStatus.OK);
}
EDIT: This is my postman configuration