diff --git a/README.md b/README.md index 8a830356..7918be8d 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,24 @@ If you don't want fancy JS features, all you have to do is just switch to `:inpu ``` +### Unsigned Uploads + +If you're using Cloudinary's [unsigned uploads feature](http://cloudinary.com/blog/direct_upload_made_easy_from_browser_or_mobile_app_to_the_cloud), where you can upload to Cloudinary directly from the browser without using Attachinary, you can save the upload in your database as an Attachinary record without triggering another upload by doing the following: + +```ruby +model.upload = { + :version => "123456", + :public_id => "askdjfslkdjflksd", + :resource_type => "image", + :format => "png" +} + +# or + +model.upload = '{"version":"123456","public_id":"askdjfslkdjflksd","resource_type":"image","format":"png"}' +``` + + ## Conventions * always use singular identifier after `has_attachment` (e.g. `has_attachment :photo`)