Google Storage Assets

Google Storage Assets

Store Vendure assets on Google Cloud Storage.

npm install @pinelab/vendure-plugin-google-storage-assets
Latest version1.3.0
Compatibility>=2.2.0
Last publishedDec 20, 2024
Pinelab
PinelabWebshops for mission-driven brands and wholesalers

Official documentation here

Plugin for storing Vendure assets on Google Cloud Storage

Getting started

  1. Create a bucket which is publicly available in Google Cloud.
  2. Add to your sendcloud.dev-config.ts

Local development

  1. Run gcloud auth application-default login
  2. Create a .env file with the following contents:
  1. Run yarn start and go to https://localhost:3050/admin to test asset uploads

Internally this plugin uses new Storage(); to instantiate the Storage client, which uses ENV variables to authenticate:

// By default, the client will authenticate using the service account file // specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use // the project specified by the GCLOUD_PROJECT environment variable. See // https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application

https://cloud.google.com/compute/docs/tutorials/nodejs-guide