I'm trying to send the following request through my Controller
@RequestMapping(value = {"/fileupload"}, method = RequestMethod.POST, consumes = {MediaType.ALL_VALUE)
@ResponseStatus(value = HttpStatus.OK)
@ResponseBody
public Object fileupload(@RequestPart MultipartFile[] file,@RequestPart DTO dto) throws Exception {
}
But I get the following error
CORSFilter HTTP Request: POST
org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/octet-stream' not supported
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:226)
at org.springframework.web.servlet.mvc.method.annotation.RequestPartMethodArgumentResolver.resolveArgument(RequestPartMethodArgumentResolver.java:132)