You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The web interface supports a shared-publicly checkbox (see screenshot below). We should support this functionality for easy-share links! BAM!
Something like this:
bucket.makePublic('filename.png',function(err,public_url){console.log(public_url);// https://storage.googleapis.com/bucket-name/filename.png});// could also return file stat instead of public url for more infobucket.makePrivate('filename.png',function(err,stat){console.log(stat.acl);// [] (assuming acl is the ObjectAccessControls object here) });
Activity
[-]bucket.makePublic(fd, cb) & bucket.makePrivate(fd, cb) && object.[/-][+]bucket.makePublic(fd, cb) & bucket.makePrivate(fd, cb)[/+][-]bucket.makePublic(fd, cb) & bucket.makePrivate(fd, cb)[/-][+]storage: bucket.makePublic(fd, cb) & bucket.makePrivate(fd, cb)[/+]rakyll commentedon Sep 2, 2014
This should go into the
writeoperation as previously suggested. ACL changes should succeed and fail with metadata/contents changes atomically.Btw, in your use case, you can set bucket's default ACL to be publicly readable. https://developers.google.com/storage/docs/json_api/v1/defaultObjectAccessControls/insert (Developers Console has a screen to manage bucket ACL as well.) You dont have to set ACL for each individual file.
Most of the time, people create a separate bucket for public blobs.
ryanseys commentedon Sep 3, 2014
Oh okay, I'll close this.
build: switch to GitHub magic proxy (#162)
fix: allow passing gax instance to client constructor (#162)
63 remaining items
Improved error messages for custom types (#162)
Add `directory` option to `getFiles()` (#162)
chore: update gapic-generator-typescript to v1.3.2 (#162)
test: fix system tests (#162)
Fix region tags in spanner ref docs. (#162)
build: update linkinator config (#162)
chore(deps): lock file maintenance (#162)
build: use codecov's action, now that it's authless (#162)
chore: migrate to owl bot (#162)
chore: upgrade to latest of all dependencies (#162)
Add `directory` option to `getFiles()` (googleapis#162)
Convert common js patterns to use node-v6 capabilities. (#162)
Convert common js patterns to use node-v6 capabilities. (#162)
Convert common js patterns to use node-v6 capabilities. (#162)
Convert common js patterns to use node-v6 capabilities. (googleapis#162)