Sha256: eb543d9849b1aa4f18af049239649deab27192ae0f9c1c24a47e82dc3ccf991f
Contents?: true
Size: 985 Bytes
Versions: 40
Compression:
Stored size: 985 Bytes
Contents
var generateSignature = function(callback, params_to_sign){ params_to_sign["_id"] = $("#image_id").text(); params_to_sign["parent_id"] = $("#parent_id").text(); params_to_sign["parent_class"] = $("#parent_class").text(); $.ajax({ url : "/auth/images", type : "POST", dataType: "text", data : { image: params_to_sign }, complete: function() {console.log("complete")}, success : function(signature, textStatus, xhr) { console.log("signature returned is:"); console.log(signature); callback(signature); }, error : function(xhr, status, error) { console.log(xhr, status, error); } }); } document.addEventListener("turbolinks:load", function() { $('#upload_widget_opener').cloudinary_upload_widget( { cloud_name: "doohavoda", api_key:"393369625566631", upload_signature: generateSignature, public_id: $("#image_id").text()}, function(error, result) { console.log(error, result) }); })
Version data entries
40 entries across 40 versions & 1 rubygems