I use Attachinray with Cloudinary, for direct upload. Everything works very well, except the fact that when I try to save files in my controller, I do not have the original filenames.
Here is a sample of my code:
class User
has_attachments :pictures
end
My form :
= simple_form_for @user do |f|
= f.attachinary_file_field :pictures, as: :attachinary
= f.submit t('.submit')
Once my files are uploaded, when I submit the form, I lost original filenames. Here is what I get for one file :
{"public_id"=>"ryfeummp2ikmzkss4cfy", "version"=>1427873505, "signature"=>"8475fccf9914dd05f6fg622ee39c1cb7ddd25f11", "width"=>78, "height"=>100, "format"=>"png", "resource_type"=>"image", "created_at"=>"2015-03-24T14:48:25Z", "tags"=>["development_env", "attachinary_tmp"], "bytes"=>19882, "type"=>"upload", "etag"=>"1fefdabba402263d18a92238ba4275c9", "url"=>"http://res.cloudinary.com/dd9blzv7x/image/upload/v1427873505/ryfeummp2ikmzkss4cfy.png", "secure_url"=>"https://res.cloudinary.com/dd9blzv7x/image/upload/v1427873505/ryfeummp2ikmzkss4cfy.png"}
Does anyone know if it's possible to keep track of the original filename ?