GeezerVison is showing github.com — Document how to create bucket with predefinedAcl · Issue #319 · googleapis/google-cloud-node
Document how to create bucket with predefinedAcl #319Labels 🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged. DescriptionI'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 :) ActivityKyleAMathews commented on Dec 4, 2014 More specifically I'd like all the files I upload to have a checkbox on "Shared publicly" stephenplusplus commented on Dec 4, 2014 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 :)
Reacted by Alfredo Delgado KyleAMathews commented on Dec 4, 2014 Woot! That works! Thanks! added a commit that references this issue on Dec 4, 2014This issue will close once commit 43a850c is merged into the 'master' branch.43a850c added a commit that references this issue on Dec 4, 2014This issue will close once commit f272ea2 is merged into the 'main' branch.f272ea2
MetadataMetadata🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged. DevelopmentNo branches or pull requestsIssue actions
|