Convert you FilePart to File then use file object use as you want Convert filepart to Byte Array
private Filebyte[] convertMultiPartToFileconvertFilePartToByteArray(FilePart file) throws IOException { File convFile = new File(file.filename()); file.transferTo(convFile); return convFile;Files.readAllBytes(convFile.toPath()); }