Skip to content

Globobeet/keystone-cloudinary-gallery-field

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keystone Cloudinary Gallery Field

A sortable list of images uploaded to Cloudinary.

Screensot

Usage

You will first need to install the package with your preferred package manager:

yarn add @globobeet/keystone-cloudinary-gallery-field
npm install @globobeet/keystone-cloudinary-gallery-field

Then, you'll need a file adapter (which is also used for CloudinaryImage fields)

const { CloudinaryAdapter } = require('@keystonejs/file-adapters');

const cloudinaryAdapter = new CloudinaryAdapter({
  cloudName: process.env.CLOUDINARY_CLOUD_NAME,
  apiKey: process.env.CLOUDINARY_KEY,
  apiSecret: process.env.CLOUDINARY_SECRET,
  folder: 'my-keystone-app',
});

Then add the field to any list, passing your CloudinaryAdapter instance

const KeystoneCloudinaryGallery = require('@globobeet/keystone-cloudinary-gallery-field');

keystone.createList('Post', {
  fields: {
    photos: {
      type: KeystoneCloudinaryGallery,
      adapter: cloudinaryAdapter,
    },
  },
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •