On 13 Feb 2008, at 13:41, Saurabh Purnaye wrote:
>
> Actually i have came across a situation where i will have to store an
> image in the database and show the same image.. for this purpose i
> have
> used LONGBLOB field in mysql and stored the image..
> I have to show this image to the user from db.. and i dont knwo how
> to
> show the image in this way..
Use send_data. It allows you to tell the browser what mime type the
image is so that the browser knows what to do with it.
something like this should do the trick
send_data(some_chunk_of_data, :disposition => ''inline'',
:type=> ''image/
png'', :filename => ''foo.png'')
>
> I have got answer for this in php on
> http://www.weberdev.com/get_example-4062.html(php code.)
> There is some function called Header in php but i dont know about
> rails...
> Pls help me out..
> Thanks and regards
> Saurabh Purnaye
> saurabh.purnaye-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> --
> 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
-~----------~----~----~----~------~----~------~--~---