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 <[email protected]> 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
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to