I am trying to upload a file which works fine, the method looks like this:
@PostMapping("/upload")
public FileResponse uploadFile(@RequestPart("file") MultipartFile file) {
...
But when I try to upload another json beside it it gets error:
@PostMapping("/upload")
public FileResponse uploadFile(@RequestPart("file") MultipartFile file, @RequestBody UserDTO userDTO) {
...
I need UserDTO to verify the user.
Here is my postman snap: