{"action":"opened","issue":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/1270","labels_url":"https://api.github.com/repos/keystonejs/keystone/issues/1270/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone/issues/1270/comments","events_url":"https://api.github.com/repos/keystonejs/keystone/issues/1270/events","html_url":"https://github.com/keystonejs/keystone/issues/1270","id":65425406,"number":1270,"title":"Make global \"wysiwyg cloudinary images\" key optional","user":{"login":"albertogasparin","id":84136,"avatar_url":"https://avatars.githubusercontent.com/u/84136?v=3","gravatar_id":"","url":"https://api.github.com/users/albertogasparin","html_url":"https://github.com/albertogasparin","followers_url":"https://api.github.com/users/albertogasparin/followers","following_url":"https://api.github.com/users/albertogasparin/following{/other_user}","gists_url":"https://api.github.com/users/albertogasparin/gists{/gist_id}","starred_url":"https://api.github.com/users/albertogasparin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertogasparin/subscriptions","organizations_url":"https://api.github.com/users/albertogasparin/orgs","repos_url":"https://api.github.com/users/albertogasparin/repos","events_url":"https://api.github.com/users/albertogasparin/events{/privacy}","received_events_url":"https://api.github.com/users/albertogasparin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-31T11:00:00Z","updated_at":"2015-03-31T11:00:00Z","closed_at":null,"body":"Now that per-field wysiwyg options are working, I don't see the point on forcing users to set that global setting (it adds the image button on every wysiwyg field).\r\nHowever, without that option the upload does not work because the API route is set only if `wysiwyg cloudinary images` is `true`.\r\n\r\nTo fix it: change [lib/core/routes.js#L78-91](https://github.com/keystonejs/keystone/blob/master/lib/core/routes.js#L78-91) to:\r\n\r\n```js\r\n// Cloudinary API for selecting an existing image and uploading a new one\r\nif (keystone.get('cloudinary config')) {\r\n\tdebug('setting cloudinary api');\r\n\tapp.get('/keystone/api/cloudinary/get', require('../../routes/api/cloudinary').get);\r\n\tapp.get('/keystone/api/cloudinary/autocomplete', require('../../routes/api/cloudinary').autocomplete);\r\n\tapp.post('/keystone/api/cloudinary/upload', require('../../routes/api/cloudinary').upload);\r\n}\r\n```\r\n\r\nI can create a PR if you agree."}}