首页 > 解决方案 > Google cloud storage, public objects but not public project

问题描述

I have a google storage bucket to store files, some of folders I want to make public, the others not.

So I can set "allUsers" as viewer, but for whole bucket. But even if I make for whole bucket, users can see the list of all files if they go straight to bucket url.

What I have.

bucket / 
   images/
   pdfs/
   docx/

So I want the images folder be public and access only with direct link, the rest not. Is there any such kind of config?

标签: google-cloud-platformgoogle-cloud-storage

解决方案


您应该能够按存储桶上的对象设置公共访问权限,然后仅将图像文件夹设置为公共。所以不要公开存储桶,只公开图像文件夹。那应该做你想做的事。应该都可以从谷歌云控制台完成。


推荐阅读