craftcms / google-cloud
Craft CMS 的 Google Cloud Storage 集成
2.2.0
2024-03-21 18:21 UTC
Requires
- php: ^8.0.2
- craftcms/cms: ^4.0.0-alpha.1|^5.0.0-beta.1
- craftcms/flysystem: ^1.0.0-beta.2|^2.0.0
- league/flysystem-google-cloud-storage: ^3.0.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
- craftcms/rector: dev-main
This package is auto-updated.
Last update: 2024-08-29 16:52:29 UTC
README
此插件为 Google Cloud Storage 提供了 Craft CMS 的集成。
要求
此插件需要 Craft CMS 4.0.0+ 或 5.0.0+。
安装
您可以从插件商店或使用 Composer 安装此插件。
从插件商店
转到您项目控制面板中的插件商店,搜索“Google Cloud Storage”。然后在弹出的模态窗口中点击“安装”按钮。
使用 Composer
打开您的终端并运行以下命令
# go to the project directory cd /path/to/my-project.test # tell Composer to load the plugin composer require craftcms/google-cloud # tell Craft to install the plugin ./craft plugin/install google-cloud
设置
您的 Google Cloud 存储桶必须使用 Google 的 精细粒度
(按对象)权限,而不是 统一
(按桶)权限。
在新存储桶的权限表中,将 存储对象查看器
授予 所有用户
。应将 存储管理员
角色授予与凭证关联的服务帐户。
要为您的 Google Cloud 存储桶创建新的资产卷,请转到设置 → 资产,创建新的卷,并将卷类型设置更改为“Google Cloud Storage”。
提示:项目 ID、存储桶和子文件夹设置可以设置为环境变量。有关更多信息,请参阅 Craft 文档中的 环境配置。