Git Product home page Git Product logo

strapi-provider-upload-google-cloud-storage's Introduction

strapi-provider-upload-google-cloud-storage

Non-Official Google Cloud Storage Provider for Strapi Upload

Installation

Install the package from your app root directory

cd /path/to/strapi/
npm install strapi-provider-upload-google-cloud-storage --save

Setting up Google authentification

  1. In the GCP Console, go to the Create service account key page..
  2. From the Service account list, select New service account.
  3. In the Service account name field, enter a name.
  4. From the Role list, select Storage > Administrator.
  5. Click Create. A JSON file that contains your key downloads to your computer.

Setting up Strapi upload configuration

  1. Copy the full content of the downloaded JSON file
  2. Paste it into the "Service Account JSON" field in Strapi Upload Settings
  3. Set an existing multi-regional Bucket name
  4. Define a multi-regional location (Europe [eu], Asia [asia] or United States of America [us])
  5. Save the configuration
  6. Enjoy !

Optional - Setting up Strapi from environment variable

If you prefer, you can set up the configuration into config/custom.json file like this :

{
  "customConfig": "This configuration is accessible through strapi.config.environments.development.myCustomConfiguration",
  "gcs": {
    "serviceAccount": "${process.env.GCS_SERVICE_ACCOUNT || GCS Service Account JSON}",
    "bucketName": "${process.env.GCS_BUCKET_NAME || GCS Bucket Name}",
    "bucketLocation": "${process.env.GCS_BUCKET_LOCATION || GCS Bucket Location}",
    "baseUrl": "${process.env.GCS_BASE_URL || GCS Base URL}"
  }
}

You can rename the environment variables as you like.

bucketLocation options :

  • us
  • eu
  • asia

Bucket baseUrl options :

Important information

If the bucket doesn't exist, the plugin will try to create it for you. So be carefull when you select the multi-regional option, because your bucket will be located inside.

Resources

Links

strapi-provider-upload-google-cloud-storage's People

Contributors

zcapin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.