Skip to content

Commit

Permalink
readme: elaborate createBucket example
Browse files Browse the repository at this point in the history
Fixes #709
  • Loading branch information
stephenplusplus committed Jul 9, 2015
1 parent a3e8aad commit ce560ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,14 @@ var gcs = gcloud.storage({
});

// Create a new bucket.
gcs.createBucket('my-new-bucket', function(err, bucket) {});
gcs.createBucket('my-new-bucket', function(err, bucket) {
if (!err) {
// "my-new-bucket" was successfully created.
}
});

// Reference an existing bucket.
var bucket = gcs.bucket('my-bucket');
var bucket = gcs.bucket('my-existing-bucket');

// Upload a local file to a new file to be created in your bucket.
var fileStream = fs.createReadStream('/local/file.txt');
Expand Down

0 comments on commit ce560ab

Please sign in to comment.