keystone-classic icon indicating copy to clipboard operation
keystone-classic copied to clipboard

Cloudinary select

Open koenoe opened this issue 8 years ago • 4 comments

I'm using 4.0.0-beta.5 on Node 6.10.0.

Steps to reproduce the behavior

Create a new Keystone List and add an CloudinaryImage field, with the select option. Set cloudinary folders to true and make sure auto-create folders is enabled in Cloudinary upload settings.

Example:

Hero.add({
  language: { type: Types.Select, options: [{ value: 'nl', label: 'NL' }, { value: 'en', label: 'EN' }], required: true, initial: true, default: 'nl', index: true },
  title: { type: String, required: true, initial: true },
  subtitle: { type: String, required: true, initial: true },
  image: { type: Types.CloudinaryImage, folder: 'hero', autoCleanup: true, select: true },
  imageMobile: { type: Types.CloudinaryImage, folder: 'hero', autoCleanup: true, select: true },
});

Expected behavior

When I upload an image via the Admin UI, I expect the uploaded image to appear in Cloudinary in the folder 'hero'. Also I expect a selectbox to show up in the Admin UI when I'm creating a new item where I can select previously uploaded images in that specific folder.

Actual behavior

Images get uploaded in Cloudinary in the folder 'hero'. However when I create a new 'Hero' via the Admin UI all I see is an Upload Image button and no selectbox to select previously uploaded images.

koenoe avatar Mar 14 '17 14:03 koenoe

I can confirm this with 4.0.0-beta.5 on Node 6.40.0. I'm really really new in keystone can anyone point me for place where to properly debug?

creaux avatar Mar 29 '17 20:03 creaux

Did you ever find a solution?

MillerApps avatar Jul 19 '17 22:07 MillerApps

is it my understanding that this is not working right? I'm using "keystone": "^4.0.0" in my model I have

mainPicture: {
  type: Types.CloudinaryImage,
  select: true,
  autoCleanup: true,
  selectPrefix: '/kett/products',
  folder: '/kett/products',
  generateFilename: file => file.originalname.replace(/ /g, '-'),
},

But in admin UI there is no select box. Just a button to upload. keystone_product

kengres avatar Apr 18 '19 06:04 kengres

A couple of features in the Cloudinary field are broken currently, correct. There is effort to get it fixed, like #4774

laurenskling avatar Apr 30 '19 19:04 laurenskling