Images in the database

Hi All,

Can someone please tell me how I can show database stored images within a template. I've managed to show them in a new screen with send_data but can't seem to find how and if it's possible to show it in the template. The only thing I've tracked in different references and books are displaying it on a new page. So could someone tell me if I'm chasing ghosts?

Kind regards, Jeroen van Doorn

I think maybe Koloa meant file_column rather than acts_as_column?

Both acts_as_attachment and file_column make it relatively easy to upload files (images) and store as blob.

You can find them along with all the other major plugin references at http://wiki.rubyonrails.com/rails/pages/Plugins

Blessings,

Jeff

koloa schreef:

have you thought of trying acts as attachment or acts as column?

Nope, I'll look into this. Thanx!

Hello Jeroen,

Francois Beausoleil schreef:

Hello Jeroen,

Can someone please tell me how I can show database stored images within a template. I've managed to show them in a new screen with send_data but can't seem to find how and if it's possible to show it in the template. The only thing I've tracked in different references and books are displaying it on a new page. So could someone tell me if I'm chasing ghosts?      You are 95% of the way there. You need an image tag that will display the image. Since you already have an action that displays the image, you simply need to tell the browser about it.

<img src="/my/action/with/the/image.jpg" width="200" height="200"/>

Hope that helps !   ------------------------------------------------------------------------

No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.15/581 - Release Date: 9-12-2006   

Wow! I never thought of that ... how stupid :slight_smile:

Thanx!

How about flex_image

http://beautifulpixel.textdriven.com/flex_image/index.html

I ve been using it and it is very handy to play with images.

Would be another alternative, but I don't need the extra options. So such a plugin would make my code(base) larger than nessacery. When I need to do image manipulation in the future, I'll definitly will use fleximage

Kind regards, Jeroen