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.