Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module replaces your Drupal site's local file storage with Google Cloud Storage. This allows you to store and manage files directly in Google Cloud, and can be configured as the default file system or for specific fields.

Flysystem Google Cloud Storage provides a Google Cloud Storage plugin
for Flysystem. This plugin allows you to replace the local file system with Google
Storage
. Flysystem GCS can be used as the default file system or can be configured
for each file/image field separately.

Requirements

Upload the Service Account JSON file to your site by following these steps:

  1. Create a project in GCP.
  2. Go to the storage browser and create a bucket.
  3. Create a Service Account and get private key:
    • Go to the Service Accounts page.
    • Create Service Account with Storage Admin role.
    • Create a new key for the Service Account (key type - JSON).
    • Download the JSON file to a private folder in your site.

This module requires the following dependencies:

Installation

Install as you would normally install a contributed Drupal module. For further
information, see Installing Drupal Modules.

Configuration

Stream wrappers are configured in settings.php (see the Flysystem README.md).

Example configuration

$settings['flysystem'] = [
  'cloud-storage' => [
    'driver' => 'gcs',
    'config' => [
      'bucket' => 'example',
      'keyFilePath' => '/serviceaccount.json',
      'projectId' => 'google-project-id',
      // More options: https://googlecloudplatform.github.io/google-cloud-php/#/docs/google-cloud/v0.46.0/storage/storageclient?method=__construct.
      // Optional local configuration; see https://github.com/Superbalist/flysystem-google-cloud-storage#google-storage-specifics.
      '_localConfig' => [
        'prefix' => 'extra-folder/another-folder/',
        // Change part of URLs from https://storage.googleapis.com/[bucket_name]/extra-folder/another-folder/ to https://cname/.
        'uri' => 'https://cname',
      ],
    ],
    'cache' => true, // Cache filesystem metadata.
  ],
];

After this, make sure to apply the following configuration changes to your Drupal installation:

  • Change the default download method for File system at /admin/config/media/file-system.
  • Change the upload destination for existing fields.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Apr 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-1.0-beta3 Pre-release 8–11 Apr 17, 2025