For everyone’s reference this is where the multipart file is obtained as part of the request in REST WS:
@RequestMapping(.., headers = "Content-Type=multipart/form-data")
public Object upload(.., @RequestParam("file") MultipartFile file, ..)
If you Google around and follow threads on Stack Overflow about error 415 and Spring, a number of posts talk about how this should be done. However as far as I can tell the above seems ok.
… except maybe that the
Accept header might have to be added (see here), and I’m not sure what the syntax would then be. Maybe this?
@RequestMapping(.., headers = "Accept=multipart/form-data", produces = "multipart/form-data")
@kshebbar are you in a position to try this by forking REST WS?