1String file_path = file.getPath();
2InputStream file_input_stream = new FileInputStream(file_path);
3
4BlobId blobId = BlobId.of(bucket, folder+"/"+blobName);
5System.out.println("Blob Id:"+blobId);
6BlobInfo blobInfo = BlobInfo
7 .newBuilder(blobId)
8 .setContentType("application/pdf")
9 .build();
10Blob blob = storage.create(blobInfo, file_input_stream.readAllBytes());
11