Question

Google cloud storage allows users to check a "publicly shared?" field in the storage manager that allows you to share a URL to the data directly.

I'm using google app engine and sending data to the storage, but I would like to have it publicly shared by default.

How can I do this? Their docs does not seem to mention anything about this, except manually doing it.

I am using python but it probably doesn't make much of a difference.

Was it helpful?

Solution

You can use the GSUtil tool and set and Default ACL on the bucket.
In the default ACL allow everyone to allow READ on the bucket, after setting the default ACL every new file in the bucket will be publicly available.

OTHER TIPS

You can set the ACL on individual files that your write to Google Storage to the values described here.

Something like

my_file = files.gs.create('/gs/some_bucket/some_object', acl='public-read')

Then you can configure the ACL on each object in the bucket individually rather than having a blanket ACL.

Use below command

gsutil defacl set public-read gs://bucketname
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top