I'm new in Ruby/Rails, so, my question: what is the perfect way to upload file and save filename in database with rails? Are there any Gem? Or maybe there are good build-in feature?
Asked
Active
Viewed 402 times
-1
-
I'm amazed of how many people ask this same exact question without searching SO first...... – stfcodes Mar 30 '12 at 11:40
-
possible duplicate of [Rails 3 paperclip vs carrierwave vs dragonfly vs attachment\_fu](http://stackoverflow.com/questions/7419731/rails-3-paperclip-vs-carrierwave-vs-dragonfly-vs-attachment-fu) – Puce Feb 25 '15 at 11:05
4 Answers
3
Just take a look on the links to choose between paperClip & carrierwave :
Rails 3 paperclip vs carrierwave vs dragonfly vs attachment_fu
And
http://bcjordan.github.com/posts/rails-image-uploading-framework-comparison/
2
You can try Paperclip.It is most popular gem in rails community...
https://github.com/thoughtbot/paperclip
these lines do the all stuff
class User < ActiveRecord::Base
has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }
end
Try it......

Kashiftufail
- 10,815
- 11
- 45
- 79