Cedric Fung
Cedric Fung

Reputation: 477

How to set Google Cloud Storage ACLs with gcloud-node?

The library was announced recently, which is much simpler to use than the old google apis client http://googlecloudplatform.blogspot.jp/2014/09/gcloud-node-google-cloud-platform-client-library-for-nodejs.html

Upvotes: 0

Views: 393

Answers (1)

CJ Behne
CJ Behne

Reputation: 48

You can set them with the ACL meta data as follows:

bucket.createWriteStream(filename, {
        'acl': [
          {
            "entity": "allUsers",
            "role": "READER"
          }
        ]
      });

This will set a object to public.

Upvotes: 3

Related Questions