google-cloud-platform - 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?
解决方案
您应该能够按存储桶上的对象设置公共访问权限,然后仅将图像文件夹设置为公共。所以不要公开存储桶,只公开图像文件夹。那应该做你想做的事。应该都可以从谷歌云控制台完成。
推荐阅读
- scala - 将 JDBC 数据库数据保存为共享状态 Spark
- jquery - 如何在 puppeteer 中启用或禁用元素属性为真/假
- flutter - 从外部小部件触发小部件动画
- php - 无法在 Ubuntu 18.10 LEMP 堆栈上安装 Laravel?
- ruby-on-rails - Rspec 控制器规范不会因缺少模板而失败
- c# - Vs.Net C# Azure 文件存储无法为现有文件共享添加文件
- xamarin - 如何为大写 Ctlr+A 和小写 Ctlr+a 的控制字符创建 KeyEvent
- java - 从其他活动通知片段
- material-ui - 如何更改 Material UI 工具栏的高度?
- java - JPA Entity 是否存储对 Entity Manager 的引用?