craftcms / google-cloud
Google Cloud Storage integration for Craft CMS
Installs: 94 422
Dependents: 1
Suggesters: 0
Security: 0
Stars: 11
Watchers: 4
Forks: 10
Open Issues: 5
Type:craft-plugin
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-11-29 17:16:00 UTC
README
This plugin provides a Google Cloud Storage integration for Craft CMS.
Requirements
This plugin requires Craft CMS 4.0.0+ or 5.0.0+.
Installation
You can install this plugin from the Plugin Store or with Composer.
From the Plugin Store
Go to the Plugin Store in your project’s Control Panel and search for “Google Cloud Storage”. Then click on the “Install” button in its modal window.
With Composer
Open your terminal and run the following commands:
# 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
Setup
Your Google Cloud bucket must use Google's Fine grained
(per object) permissions, not Uniform
(per bucket).
On the permissions table for the new bucket, grant Storage Object Viewer
to allUsers
. The Storage Admin
role should be granted to the service account the credentials are tied to.
To create a new asset volume for your Google Cloud Storage bucket, go to Settings → Assets, create a new volume, and set the Volume Type setting to “Google Cloud Storage”.
Tip: The Project ID, Bucket, and Subfolder settings can be set to environment variables. See Environmental Configuration in the Craft docs to learn more about that.