Open frankapimenta opened 8 years ago
That would be good. I need to give this package some love, I'll see what I can do over the week ^_^
What's more, looks like the official Cloudinary library has evolved a lot (v2): https://github.com/cloudinary/cloudinary_js/releases
Lepozepo many thanks for your work :)
Are there new functions published?
Thank you for your work :)
@frankapimenta I haven't added new helpers, I did upgrade dependencies though. I need to watch those packages to keep up with them. I'm going to try to give S3 some love too then I'll come back to this one to add some more helpers.
@Lepozepo I would require to have the remove tag helper. If you tell me where to start with it would make things easier to me and I would do the pull request. I'm short in time ( like everybody else I guess :D )
@frankapimenta Sounds like that would go somewhere around here: https://github.com/Lepozepo/cloudinary/blob/master/client/functions.coffee#L41 but build it however you want. If it works and doesn't break things I'll accept. I don't care much for code style so long as results are met. I'll move things around after ^_^
Would this (from http://cloudinary.com/documentation/image_upload_api_reference#api_example_12) as meteor call:
"c.remove_tag": (tag, publicIds) ->
@unblock()
check tag, String
check publicIds, Array
if Cloudinary.rules.delete
@public_id = public_id
auth_function = _.bind Cloudinary.rules.delete,this
if not auth_function()
throw new Meteor.Error "Unauthorized", "Delete not allowed"
future = new Future()
Cloudinary.uploader.remove_tag tag, publicIds, (result) ->
future.return result
return future.wait()
and this as client side function:
remove_tag: (tag, publicIds, callback) ->
Meteor.call "c.remove_tag", tag, publicIds, (error,result) ->
if error
return callback and callback error, null
else
if result.deleted[public_id] and result.deleted[public_id] is "not_found"
return callback and callback result, null
else
return callback and callback null,result
be ok to you?
Hmm, looking at the way all the other functions work maybe we can iterate over each and wrapAsync
instead. Then we wouldn't need to do much extra work if they update their API.
any news regarding this? :)
is it possible to have the remove_tag methods and so?