Lepozepo / cloudinary

MIT License
94 stars 42 forks source link

Send extra parameters to callback #9

Closed meandkareem closed 10 years ago

meandkareem commented 10 years ago

How I can send one more parameter to callback function. I need post._id so I can assign image to post entry.

tnx

Lepozepo commented 10 years ago

You can't send an additional parameter to the callback function, if you want that functionality you can add a PR or try using one of my beta functions (C.upload_image_stream(files,callback)). It sounds to me like you could be using the data in the context surrounding the function. So:

Meteor.methods({
save_url:function(response){
    console.log('Add '+response.upload_data+' to the id of '+response.context);
}
});
meandkareem commented 10 years ago

Thanks context solves all I need .

Lepozepo commented 10 years ago

Excellent ^_^