Limit API Call
Details on commit message
Hi @faxioman, sorry for my late response.
As far as I understand, the pull request is about this, right? https://cloud.google.com/storage/docs/hosting-static-website
How do the files end up in the bucket? The documentation looks like they need to be set to "publicly shared". Do you need to activate this by hand for each file, or do you do this via Python?
I think this is a nice addition to the library, but it should be documented in the README.
Hi @Strayer. Yes, you need to set the acl for the file to 'publicly shared'. You can set this behaviour for an entire buket using gsutil cli command:
gsutil -m acl -r ch -u AllUsers:R gs://my-bucket/**
After this command, a new added file always has a publick link.
Ehm ... sorry ... with the command above you set the permission for current files. This is the command for the default ACL:
gsutil defacl ch -u AllUsers:R gs://my-bucket
I see, sounds rather easy to set up! I'm wondering if this can somehow be integrated into the test suite, but since the tests automatically create their own buckets and the bucket name needs to be the same as the custom domain, this would require a lot of changes... hmm...
One possibility would be to add a test parameter for the custom domain and have the developer make sure, that the bucket for that domain exists with a valid CNAME record and a correct ACL configuration.
When you create a bucket you can access to it via http using:
https://my-bucket.storage.googleapis.com/...
but also using:
https://storage.googleapis.com/my-bucket/...
Could this be helpful?
I hope I can look into this on the weekend, then I'll be out for some days due to an operation. If not, I'll come back to it as soon as I'm back on my feet!
Don't worry Strayer, we'll be in touch after the operation ... and get well soon!
Hey @faxioman, sorry for ignoring this for so long. I'll try to look into this in the next days!
Sorry, ignored it again :( I sadly don't have the time to check this and also implement tests and documentation. If anyone wants to improve those areas for this pull request, feel free to chime in!