Strapi plugin logo for Google Cloud Storage

Google Cloud Storage

This package provides a convenient way to integrate Google Cloud Storage with Strapi, an open-source headless CMS. It allows you to upload and manage your media files on Google Cloud Storage directly from your Strapi admin panel.

strapi-google-cloud-storage Publish Package

This package provides a convenient way to integrate Google Cloud Storage with Strapi, an open-source headless CMS. It allows you to upload and manage your media files on Google Cloud Storage directly from your Strapi admin panel.

Features

  • Easy integration with Strapi projects.
  • Upload, delete, and manage media files stored in Google Cloud Storage.
  • Configurable bucket access and file paths.

Installation

npm install strapi-google-cloud-storage

or

yarn add strapi-google-cloud-storage

Configuration

  1. Google Cloud Service Account: Ensure you have a Google Cloud service account with permissions to access the necessary storage buckets.

  2. Create a Bucket: Create a bucket in Google Cloud Storage where your files will be stored.

  3. Setup Strapi Provider: In your Strapi project, configure the provider in config/plugins.js:

    1module.exports = {
    2  // ...
    3  upload: {
    4    provider: 'google-cloud-storage',
    5    providerOptions: {
    6      bucketName: 'your-bucket-name',
    7      publicFiles: true,
    8      uniform: false,
    9      basePath: '',
    10      serviceAccount: {
    11        type: 'service_account',
    12        project_id: 'your-project-id',
    13        private_key_id: 'your-private-key-id',
    14        private_key: 'your-private-key',
    15        client_email: 'your-client-email',
    16        client_id: 'your-client-id',
    17        auth_uri: 'https://accounts.google.com/o/oauth2/auth',
    18        token_uri: 'https://oauth2.googleapis.com/token',
    19        auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs',
    20        client_x509_cert_url: 'your-cert-url'
    21      },
    22    },
    23  },
    24  // ...
    25};

Usage

Once configured, the Strapi media library will automatically use Google Cloud Storage to store new files. You can upload, view, and delete files from your Strapi admin panel.

Advanced Configuration

  • Caching: You can enable caching for better performance.
  • File Access: Configure whether files are public or private.
  • Path Customization: Customize the file path and naming conventions in your bucket.

Contributing

Contributions are welcome. Please submit a pull request or open an issue for any features or fixes.

License

This project is licensed under the MIT License.


Remember to replace placeholder values like your-bucket-name, your-project-id, etc., with actual values from your Google Cloud Storage configuration. You should also include any additional information specific to the use or configuration of the package that might be helpful to users.

Install now

npm install strapi-google-cloud-storage

STATS

1 GitHub star4 weekly downloads

Last updated

511 days ago

Strapi Version

Unavailable

Author

github profile image for pattanunNP
pattanunNP

Related plugin

Import Export Entries

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.