We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8cff3f commit b533c9cCopy full SHA for b533c9c
1 file changed
google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java
@@ -36,9 +36,11 @@
36
public class CreateBlob {
37
38
public static void main(String... args) {
39
+ // [START storage_upload_file]
40
Storage storage = StorageOptions.getDefaultInstance().getService();
41
BlobId blobId = BlobId.of("bucket", "blob_name");
42
BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentType("text/plain").build();
43
Blob blob = storage.create(blobInfo, "Hello, Cloud Storage!".getBytes(UTF_8));
44
+ // [END storage_upload_file]
45
}
46
0 commit comments