I am trying to upload file in firebase storage using spring boot, below is my piece of code, my file is getting uploaded but i try to preview it from firebase UI is preview is not loading(pls refer the image) 
, while when i am uploading same file from Upload file option from firebase UI then it is previewing fine. Pls assist me with this problem.
public FileRequest uploadImage(FileRequest fileRequest, MultipartFile file) throws IOException {
if(file.isEmpty()){
throw new NullPointerException("No File Found..");
}
byte[] fileByteArray = file.getBytes();
ClassPathResource resource = new ClassPathResource("firebase.json");
Storage storage = StorageOptions
.newBuilder()
.setCredentials(ServiceAccountCredentials
.fromStream(resource.getInputStream()))
.build()
.getService();
BlobId blobId = BlobId.of(FileConstant.bucketName,fileRequest.getUploadContext() + "/" + fileRequest.getFileId());
BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentType(fileRequest.getMimeType()).build();
storage.create(blobInfo,fileByteArray);
return fileDAO.uploadFile(fileRequest);
}