Reputation: 4220
I want users to be able to upload an image and have it be associated with a particular model. When I create my migration, what type do I use for my column? In the view I would like it to look something like this:
<%= form_for @person, :html => {:multipart => true} do |f| %>
<%= f.file_field :picture %>
<% end %>
Thanks guys :)
Upvotes: 0
Views: 7570
Reputation: 173
There's also the AWS-3 gem
, if you just want cloud storage. I would think performance alone would be enough to not store an image in a DB.
Upvotes: 1
Reputation: 1719
I recommend the usage of an external plugin such as Paperclip or Carrierwave.
Upvotes: 2