I want to get the byte content of the File. Here is my controller:
@PostMapping("/files") @ResponseStatus(HttpStatus.OK) public List<UserFilesResponse> uploadFile(@RequestPart("file") FilePart file) { // I want to get the bytes[] content of my file. How can I do it please ?? }
contentfor that? However what do you want to do with thebyte[]? If to store it somewhere use one of thetransferTomethods.contentthen and read theDataBuffer.