Public_id Is Not Defined Meteor+cloudinary
I get the above error message for image upload function using Lepozepo: CLoudinary package and the following details. console.log shows successful upload and a file. I do not se
Solution 1:
Following our correspondence above, please try something like the following (collection update moved to inside of the upload response handler):
Cloudinary._upload_file(files[0], {}, function(err, res) {
if (err){
console.log("Error: " , err, err.reason);
return;
} else {
console.log("Success :" + res);
Meteor.users.update({ _id: Meteor.userId() }, {
$set: { 'profile.avatar': res.public_id }
});
}
});
Hope this makes more sense now...
Post a Comment for "Public_id Is Not Defined Meteor+cloudinary"