Forum: Ruby on Rails Upload File

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Hasana H. (Guest)
on 2007-03-19 11:53
How to upload file to database for example file jpeg.
Ivor P. (Guest)
on 2007-03-19 12:27
(Received via mailing list)
Hi Hasana

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
dit
not find it as intuitive as acts_as_attachment.

http://technoweenie.stikipad.com/plugins/show/Acts...

The default behaviour is to upload the files to a directory in the
public
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
database...

If you install rmagick you will be able to do some nice stuff with
images as
you upload them, like create a thumbnail version of the image aswell.

Regards
Ivor
This topic is locked and can not be replied to.