Lepozepo / cloudinary

MIT License
94 stars 42 forks source link

v2.0.0 help #6

Closed Miggz closed 10 years ago

Miggz commented 10 years ago

Please feel free to talk to me like an idiot, but how can I access the data from cloudinary client-side?

I've got the upload working and i've got it calling a serverside function, but if I just want the upload information on the client-side? How would I do this?

Any help is most appreciated.

Lepozepo commented 10 years ago

Hi, there's no real function right now to access the image data client side although if you really really have to you can view it via the local-only _cloudinary collection (so basically do _cloudinary.find().fetch()). Still, I would personally use the Meteor.method to save to a collection on the server and make sure that collection is subscribed to on the client and is reactive. (so basically Meteor.subscribe("stuff_with_images"), then Stuff.find() on your view with the {{image}}, and on the .method you have something like Stuff.update(id,{$set:{image:r.upload_data.secure_url}}))

Maybe a look at the example folder will help you out: https://github.com/Lepozepo/cloudinary/tree/master/example/basic

Miggz commented 10 years ago

Thanks for the quick response. I will go the server-side route.

On Thu, Jul 17, 2014 at 12:34 AM, Marcelo Reyna notifications@github.com wrote:

Hi, there's no real function right now to access the image data client side although if you really really have to you can view it via the local-only _cloudinary collection (so basically do _cloudinary.find().fetch()). Still, I would personally use the Meteor.method to save to a collection on the server and make sure that collection is subscribed to on the client and is reactive. (so basically Meteor.subscribe("stuff_with_images"), then Stuff.find() on your view with the {{image}}, and on the .method you have something like Stuff.update(id,{$set:{image:r.upload_data.secure_url}}))

Maybe a look at the example folder will help you out: https://github.com/Lepozepo/cloudinary/tree/master/example/basic

— Reply to this email directly or view it on GitHub https://github.com/Lepozepo/cloudinary/issues/6#issuecomment-49260130.

Lepozepo commented 10 years ago

No problem ^_^ let me know if that works out for you and if it doesn't then I'll see what I can do to make it a little bit easier client-side.