I am trying to set the files that are uploaded to a bucket to public by default.
When editing the bucket permissions, I get the popup below which I don't understand and I can't find any documentation about it. How do I set availability to the public?
The 'entity' selectboxes have the options: domain, group, user, project
The settings currently don't seem to set the files to public, because when I try to access a file through the url obtained with CloudStorageTools::getPublicUrl($fileName, false)
I get:
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
</Error>
Making Data Public
Active Google Cloud Shell
In the command, in the path after choosing the bucket, the CamelCase writing style must be respected.
I recommend applying the command to each file separately to get the short URL. Because if we assign the permission to the directory it will be possible to access the files but through a long URL.
Short URL:
You;ll want to set an ACL for that:
gsutil defacl set public-read gs://bucket