public ResponseEntity<User> handleFileUpload(@RequestParam("user") User user, @RequestPart("file") MultipartFile file)
public ResponseEntity<User> handleFileUpload(@RequestPart("user") User user, @RequestPart("file") MultipartFile file)
curl -i -X POST -H "Content-Type: multipart/form-data"
-F 'user={"name":"John","age":12};type=application/json'
-F "file=@myfile.txt" http://localhost:8080/post