Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

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.

Activity

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

Releases

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