2

In my Spring boot app I can upload local files to the server which works fine:

@RequestMapping(value = "", method = RequestMethod.POST)
public ResponseEntity uploadoFile(@RequestParam("file") MultipartFile file, @RequestHeader HttpHeaders headers) {
    SaveFile(file, headers);
}

However the uploaded files can be large so I decided to use a library in the front app that used chunks while uploading, each chunk with a fixed size (ex: 1MB).

Now since each chunk is sent in a separate request, the rest controller is called for each chunk, so the SaveFile will save the last chunk (override each time the saved chunk).

I need a solution where I can use the chunks and save the whole file.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Abdennacer Lachiheb
  • 4,388
  • 7
  • 30
  • 61
  • > so I decided to use a library in the front app that used chunks Which library? – ETL Mar 31 '22 at 04:56

0 Answers0