I agree with Philip - definately try Paperclip and avoid using BLOB
columns for file attachments.
I did some work recently on getting Paperclip to work with BLOBs; if
you do need to store files in a database table for some reason (e.g.
legacy data, security, etc.) then you might want to read this:
http://patshaughnessy.net/2009/5/29/paperclip-sample-app-part-3-saving-file-attachments-in-a-database-blob-column
- pat
On Jul 23, 10:34 pm, Phlip
<phlip2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Ricardo wrote:
> > how i can show a image stored in a blob field in my database mysql ?
>
> This is a FAQ, and the answer is "save yourself years of torture and
agony by
> using Paperclip, and never again think of storing an image inside a
blob". There
> are just so many reasons that is wrong, beginning with the simple fact that
your
> web server will serve image files directly from your hard drive, and both
of
> them are tuned to do this efficiently, unlike Ruby and MySQL.
>
> --
> Phlip