Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

flysystem_gcs

134 sites Security covered
View on drupal.org

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
Release cadence
Stability
0% stable

Releases

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