Hello,
I have problem in displaying image from database when production (All
work well unless displaying image from database), please help me how to
display my image.
DATABASE DETAIL
--------------------
employee_name, type data -> varchar
...
face_pict - type data -> bolb
pict_content - type data -> varchar
pict_file_name - type data -> varchar
--------------------------------
display_image_controller.rb
--------------------------------
class DisplayImageController < ApplicationController
def employee_face
@employees = Employee.find(params[:id])
send_data(@employees.face_pict, :filename =>
@employees.pict_file_name, :type => @employees.pict_content,
:disposition => "inline")
end
end
--------------------------------
employee.rhtml
--------------------------------
...
<%= image_tag("/display_image/employee_face?id="+employee.id.to_s,
:alt
=> employee.name, :class => "fix_pict") %>
...
EVEN THIS SCRIPT STILL CAN NOT DISPLAY IMAGE
...
<image class = "fix_pict"
src="/display_image/employee_face?id=<%employee.id %> ">
...
Please I really need your help (begging)
Riand
--
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
-~----------~----~----~----~------~----~------~--~---
face_pict - type data -> bolb bolb? On Feb 18, 11:21 am, Fransiscus Xaverius <rails-mailing-l...@andreas- s.net> wrote:> Hello, > > I have problem in displaying image from database when production (All > work well unless displaying image from database), please help me how to > display my image. > > DATABASE DETAIL > -------------------- > > employee_name, type data -> varchar > > ... > > face_pict - type data -> bolb > pict_content - type data -> varchar > pict_file_name - type data -> varchar > > -------------------------------- > display_image_controller.rb > -------------------------------- > > class DisplayImageController < ApplicationController > > def employee_face > @employees = Employee.find(params[:id]) > send_data(@employees.face_pict, :filename => > @employees.pict_file_name, :type => @employees.pict_content, > :disposition => "inline") > end > > end > > -------------------------------- > employee.rhtml > -------------------------------- > > ... > > <%= image_tag("/display_image/employee_face?id="+employee.id.to_s, :alt > => employee.name, :class => "fix_pict") %> > > ... > > EVEN THIS SCRIPT STILL CAN NOT DISPLAY IMAGE > > ... > > <image class = "fix_pict" src="/display_image/employee_face?id=<%> employee.id %> "> > ... > > Please I really need your help (begging) > > Riand > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sorry I mean, it is blob not bolb (wrong typing)> face_pict - type data -> blob-- 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 -~----------~----~----~----~------~----~------~--~---