0
votes

I created an bucket on Google cloud storage and set the permission "Read access to GCS objects" to allUsers.

So, I can use storage.googleapis.com/bucket-name/object-name to let anyone to read the object.

However, if I wanna assign a random object of this bucket to every read request by just 1 single URL, is that available? (e.g. storage.googleapis.com/bucket-name/random)

I know that the permission is assign to the bucket not the object, so seems like I can do something to grab a random object? or what service I should use to solve the problem?

1

1 Answers

0
votes

Objects have acls too, and you can grant AllUsers READ to an object. That being said, it can be a pain to manage per object acls, so I would recommend using a second bucket instead.

Depending on your use case you might be more interested in Signed URLs. You can use signed urls to grant temporary access to a user instead of permanent access to everyone.