Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
Is there a way to send an image and text field items from react js(hooks) to spring boot api endpoint with the same url at the same time

this is the spring boot API endpoint which receives request from react js frontend

@PostMapping(value = "/upload", consumes = {MediaType.APPLICATION_JSON_VALUE, 
MediaType.MULTIPART_FORM_DATA_VALUE})
public ResponseEntity<MessageResponse> uploadFile(@RequestPart("fileDB") String fileDB, 
@RequestPart("file") MultipartFile file) {
  String message = "";
  try {
    storageService.store(file, fileDB);

    message = "Uploaded the file successfully: " + file.getOriginalFilename();
    return ResponseEntity.status(HttpStatus.OK).body(new MessageResponse(message));
  } catch (Exception e) {
    message = "Could not upload the file: " + file.getOriginalFilename() + "!";
    return ResponseEntity.status(HttpStatus.EXPECTATION_FAILED).body(new 
 MessageResponse(message));
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!