Rails paperclip upload csv -


i want upload csv file paperclip

but have got paperclip::errors::notidentifiedbyimagemagickerror

my form

<%= form_for upload.new |form| %> <%= form.file_field :file %> <%= form.submit%> <% end %>

model

class upload < activerecord::base   has_attached_file :file, styles: { medium: "300x300>", thumb: "100x100>" },       :path => ":rails_root/public/system/:attachment/:id/:style_:filename"   validates_attachment_content_type :file,  content_type: ['text/plain', 'text/csv', 'application/vnd.ms-excel'], message: "is not in csv format"  end 

how fix it?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -