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

331
Views
Upload Binary file on aws s3 using java Spring

I am able to upload file Using Form data as given below

enter image description here

but when i am trying to upload file by selecting binary as input getting error as given below;

{"timestamp":1490680735011,"status":500,"error":"Internal Server Error","exception":"org.springframework.web.multipart.MultipartException","message":"Current request is not a multipart request","path":"/uploadBinary"}

for that i am writing code as

@RequestMapping(value = "/uploadBinary", method = RequestMethod.POST)
public ResponseEntity<Object> uploadBinary(
        @RequestParam("file") MultipartFile[] multipartFiles) {
    try {
        System.out.println("starting....");
        fileService.upload(multipartFiles);
        System.out.println("uploaded successfully ");
    } catch (Exception ex) {
        System.out.println(ex.getMessage());
        return new ResponseEntity<Object>(new String(
                "Something Went wrong while uploading data to server"),
                HttpStatus.OK);
    }
    return new ResponseEntity<Object>(new String("uploaded successfully "),
            HttpStatus.OK);
}

this works fine for uploading form data, but for binary selection its not working. how we resolve this issues??

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Check whether you have added CommonsMultipartResolver in your spring configuration file

<bean id="multipartResolver"  class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>
about 4 years ago · Santiago Trujillo Report
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!