How to upload file to database for example file jpeg.
Look at acts_as_attachment. I have used it and it works great. The
alternative is file_column but I struggled to get it going properly and
not find it as intuitive as acts_as_attachment.
The default behaviour is to upload the files to a directory in the
folder of your app, and store the URI of the file in the database as a
string, however, I believe you can also save the files in binary in the
If you install rmagick you will be able to do some nice stuff with
you upload them, like create a thumbnail version of the image aswell.