Skip to content

Instantly share code, notes, and snippets.

@eaiman-shoshi
Last active March 28, 2020 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eaiman-shoshi/6414a06db982e4d26adb1de51feff2cf to your computer and use it in GitHub Desktop.
Save eaiman-shoshi/6414a06db982e4d26adb1de51feff2cf to your computer and use it in GitHub Desktop.
// use Flux<FilePart> for multiple file upload
@PostMapping(value = "/upload-flux", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_STREAM_JSON_VALUE)
@ResponseStatus(value = HttpStatus.OK)
public Flux<String> upload(@RequestPart("files") Flux<FilePart> filePartFlux) {
return uploadService.getLines(filePartFlux);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment