I am trying to upload data from an app to a spring backend service. Things to upload are a DataModel containing data of the object to create and several images linked to the data. Therefore I am using this method signature:
@RequestMapping(method = RequestMethod.POST)
@ResponseBody
public Survey createSurvey(@RequestBody SurveyPostHelper helper, @RequestParam(value="file", required = true) MultipartFile[] images)
I tried to play with the annotations, but either I get a blank images array or my helper is empty. How would you solve this?
Thanks in advance.