Leon Leslie
2007-Aug-22 18:01 UTC
Displaying Images Stored in database as Oracle Long Format
hi list,
How do i render an image stored in the database in Oracle Long format?
In controller
def logo
@trademark = Trademark.find("TT/M/1/36517")
send_data @trademark.logo.sector_data.to_blob, :filename =>
"logo.jpg",
:type => "image/jpeg", :disposition => "inline"
end
in view
<img src="/media/logo" alt="Image"/>
browser
Image is not being rendered in the browser.
Regards,
Leon leslie.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---