We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64115e4 commit 0c1a633Copy full SHA for 0c1a633
1 file changed
gcloud-java-storage/README.md
@@ -101,9 +101,9 @@ String bucketName = "my_unique_bucket"; // Change this to something unique
101
Bucket bucket = storage.create(BucketInfo.of(bucketName));
102
103
// Upload a blob to the newly created bucket
104
-BlobId blobId = BlobId.of(bucketName, "my_blob_name");
105
-Blob blob = storage.create(
106
- "my_blob_name", "a simple blob".getBytes(UTF_8), "text/plain");
+BlobId blobId = BlobId.of("bucket", "blob_name");
+BlobInfo blobInfo = BlobInfo.builder(blobId).contentType("text/plain").build();
+Blob blob = storage.create(blobInfo, "Hello, Cloud Storage!".getBytes(UTF_8));
107
```
108
109
At this point, you will be able to see your newly created bucket and blob on the Google Developers Console.
0 commit comments