Skip to content

Commit

Permalink
change to requestpart
Browse files Browse the repository at this point in the history
  • Loading branch information
Yinnii committed Oct 11, 2024
1 parent b34f9ba commit c786d8f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import javax.ws.rs.core.MediaType;

import org.glassfish.jersey.media.multipart.FormDataParam;
import org.springframework.web.bind.annotation.RequestPart;

import lombok.Locked;

Expand Down Expand Up @@ -479,7 +480,8 @@ public ResponseEntity<String> getAnalyzedText(@PathVariable("label1") String lab
@ApiResponse(responseCode = "500", description = "Response failed.")
})
@PostMapping(value = "/compareText", produces = MediaType.APPLICATION_JSON)
public ResponseEntity<String> compareText(@RequestParam MultiValueMap<String,String> fileMp, @RequestParam("file") MultipartFile file) throws ParseException, IOException {
public ResponseEntity<String> compareText(@RequestPart MultiValueMap<String,String> fileMp, @RequestPart("file") MultipartFile file) throws ParseException, IOException {
System.out.println(fileMp);
String label1 = fileMp.getFirst("label1");
String label2 = fileMp.getFirst("label2");
String type = fileMp.getFirst("type");
Expand Down

0 comments on commit c786d8f

Please sign in to comment.