Skip to content

Add an example of "how to make a file public" in the docs #350

Description

@jgeewax

I've heard from a lot of people that this is the most common request, so it'd be really cool if we had an example in our docs.

ie:


To make an object publicly readable, you might do:

var storage = gcloud.storage();
var albums = storage.bucket('albums');

albums.acl.add({
  scope: 'allUsers',
  permission: Storage.acl.READER_ROLE
}, function(err, aclObject) {});

Activity

  1. ryanseys commented on Jan 18, 2015

    @ryanseys
    Contributor

    Yes 👍 absolutely. This is implemented as a simple check-box in the google developer console. What about even a dedicated function for this such as:

    albums.acl.makePublic(function() {}); // set to allUsers reader
    albums.acl.makePrivate(function() {}); // set to no permissions (default)
  2. jgeewax commented on Jan 20, 2015

    @jgeewax
    ContributorAuthor

    Somewhat dependent on what we expose per #351

  3. stephenplusplus commented on Jan 20, 2015

    @stephenplusplus
    Contributor

    Integrating makePublic and makePrivate over in #351. Merged #357 to address the lacking docs issue.

  4. added this to the Storage Stable milestone on Feb 2, 2015
  5. added a commit that references this issue on Aug 22, 2022
  6. 30 remaining items

  7. added a commit that references this issue on Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions