JedWatson/keystone — pull request #456 by JohnnyEstilles (2014-07-09 07:02:36+00:00)
Title: Adding the ability to specify a folder for a CloudinaryImage

Cloudinary has the ability to specify a folder to organize uploaded images. To enable the use of Cloudinary folders I added a Keystone option called `cloudinary folders` that should be set to `true`.

Keystone.init({
...
'cloudinary folders': true
...
)};

or

Keystone.set('cloudinary folders', true);

A path per CloudinaryImage field can be specified using the `folder` option.

List.add({
...
photo: { type: Types.CloudinaryImage, folder: 'path/to/image' },
....
});

Otherwise default folder path will be generated from the `cloudinary prefix`, the `list path` and `field path`.

prefix/list/field

or

list/field