JSPM

keystone-google-cloud-storage-adapter

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q27421F
  • License MIT

Google Cloud Storage adapter for KeystoneJS

Package Exports

  • keystone-google-cloud-storage-adapter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (keystone-google-cloud-storage-adapter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Google Cloud Storage adapter for KeystoneJS

This adapter is designed to use it in KeystoneJS File field.

Install

npm i keystone-google-cloud-storage-adapter --save

or

yarn add keystone-google-cloud-storage-adapter

Usage

Configure the storage adapter:

var storage = new keystone.Storage({
  adapter: require('keystone-google-cloud-storage-adapter'),
  cloudStorage: {
    keyFilename: 'gcloud_auth.json',
    path: 'uploads/',
    bucket: 'the-bucket-name',
    uploadOptions: {
      public: true
    }
  },
  schema: {
    url: true,
  },
});