Open generalleger opened 9 years ago
Thank you for adding that!
Sure thing, it was driving me bananas because I thought the callback was broken... felt stupid to see it was just the console log statement. Thanks for this great package!
adding my 2 cents to this. In case you do not have any optional parameters, just pass an empty object. Or else, the callback will not be called
Cloudinary.upload(files, {}, function(err, res) {
console.log("Upload Error: " , err);
return console.log("Upload Result: " , res);
Putting this here for anyone who comes across this issue:
I am not a coffeescript user, so I usually just go to js2.coffee to translate example code from coffeescript to JS. Well, that works 99% of the time. This time it caused me a silly error that took me way too long to identify.
The example coffeescript code for the Meteor event code translates to this:
The problem was that the in the console.log method, the translator was using
+
instead of,
, and when you try to display an object in a string, it produced the [Object object] output. Simply change the+
's into,
's and you'll be good.