dimanche 31 juillet 2016

Initialize cloudinary_js v2 in Ember JS app

I'm trying to upload images to cloudinary from an EmberJS app (v2.6), following the post of Beerlington where it uses cloudinary_js (now with new API v2) and in order to install it :

npm install blueimp-file-upload --save
npm install cloudinary-jquery-file-upload --save

But when I'm trying to initialize the cloudinary the library is not recognized.

#app/initializers/cloudinary.js
export default {
  name: 'cloudinary',
  initialize: function(/* container, app */) {
    jQuery.cloudinary.config({
      cloud_name: ENV.CLOUDINARY_NAME
    });
  }
};

#console
TypeError: Cannot read property 'config' of undefined




Aucun commentaire:

Enregistrer un commentaire