Skip to content

Document how to create bucket with predefinedAcl #319

Description

@KyleAMathews

I've seen #304 and looked at setMetadata and still haven't figured this out. I'd really just like to set my files to be publically readable but can't seem to figure it out :)

Activity

  1. KyleAMathews commented on Dec 4, 2014

    @KyleAMathews
    Author

    More specifically I'd like all the files I upload to have a checkbox on "Shared publicly"

  2. stephenplusplus commented on Dec 4, 2014

    @stephenplusplus
    Contributor

    This should definitely be documented better. Bucket objects have a special yourBucket.acl.default object of functions just like yourBucket.acl (add, delete, get, and update). Here's how you can do it:

    yourBucket.acl.default.add({
      scope: "allUsers",
      role: gcloud.storage.acl.READER_ROLE
    }, function (err) {})

    allUsers comes right from the API: https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls - instead of leaving that an impossible mystery to solve, I'll add that to the docs tomorrow :)

  3. KyleAMathews commented on Dec 4, 2014

    @KyleAMathews
    Author

    Woot! That works! Thanks!

  4. added a commit that references this issue on Dec 4, 2014
    43a850c
  5. added a commit that references this issue on Dec 4, 2014
    f272ea2
  6. added this to the Storage Stable milestone on Feb 2, 2015
  7. added a commit that references this issue on Sep 27, 2022
  8. 31 remaining items

  9. added a commit that references this issue on Feb 25, 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