Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Setup

Your app requires a properly configured GCS bucket. Fortunately, each app can easily gain access to such a bucket. This bucket, called the default GCS bucket , needs no further configuration, permissions, sign-up, or activation. Moreover, the default GCS bucket has a free quota , so you do not need to make your app billable.

For apps created after the App Engine 1.9.0 release, the default GCS bucket is automatically created with your app.

For apps created before the App Engine 1.9.0 release, you can obtain a a default bucket for it by clicking Create within the Cloud Integration section in the Application Settings page of the App Engine Admin Console .

The default bucket name is typically <app_id>.appspot.com , where <app_id> is your app ID. You can find the bucket name in the App Engine Admin console Application Settings page, under the label Google Cloud Storage Bucket . Alternatively, you can use the CloudStorageTools::getDefaultGoogleStorageBucketName() method to find the name programmatically.

For example, you would write to the default bucket using the normal Cloud Storage stream wrapper:

<?php
file_put_contents('gs://<app_id>.appspot.com/hello.txt', 'Hello');

or

<?php
$fp = fopen('gs://<app_id>.appspot.com/some_file.txt', 'w');
fwrite($fp, 'Hello');
fclose($fp);

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.