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+as+Attachment
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
On 3/19/07, Hasana Hassan
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
>
> How to upload file to database for example file jpeg.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---