79822821

Date: 2025-11-17 22:09:01
Score: 0.5
Natty:
Report link

Here is a Postman example that worked for me with Spring. Important is the content type application/json. I didn't use an array for the binary files, but I think if you just define another one with the same key, that should work.

screenshot example of postman request

@PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public Document upload(@RequestPart("metadata") AddDocument addDocument,
            @RequestPart("file") MultipartFile file) {
    //implementation code
}
Reasons:
  • Whitelisted phrase (-1): worked for me
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: avo.cado