Skip to content

Commit

Permalink
Add region tags around an informative sample. (#3705)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyn committed Sep 20, 2018
1 parent e8cff3f commit b533c9c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
public class CreateBlob {

public static void main(String... args) {
// [START storage_upload_file]
Storage storage = StorageOptions.getDefaultInstance().getService();
BlobId blobId = BlobId.of("bucket", "blob_name");
BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentType("text/plain").build();
Blob blob = storage.create(blobInfo, "Hello, Cloud Storage!".getBytes(UTF_8));
// [END storage_upload_file]
}
}

0 comments on commit b533c9c

Please sign in to comment.