I'm trying to upload images to Cloudinary from the client side Backbone app.
Their documentation shows that you should create the input like this:
<input name="file" type="file"
class="cloudinary-fileupload" data-cloudinary-field="image_upload"
data-form-data=" ... html-escaped JSON data ... " ></input>
The JSON for the example:
{ "timestamp": 1345719094,
"callback": "https://www.example.com/cloudinary_cors.html",
"signature": "7ac8c757e940d95f95495aa0f1cba89ef1a8aa7a",
"api_key": "1234567890" }
The piece I'm struggling with is how do I generate the signature? Their documentation says you have to generate it on the server side, but I can't seem to find out how to do that in their documentation.
Also, the end goal is to assign the returned image URL as a model attribute. How would I go about accessing the returned image URL so that I can do a model.save(image: returnedImage)
to save it back to my server?