hey, I try to display pics (jpg) from my db but all I get is the
"white box".
The pic and all of its att look fine in the db.
It goes something like this:
in show.rhtml:
<%= image_tag(url_for(:controller =>
''upload_controller'', :action =>
"getpicture", :id => @picture.id)) %>
in upload.controller.rb:
def getpicture
@picture = Picture.find(params[:id])
send_data(@picture.data,
:filename => @picture.name,
:type => @picture.content_type,
:disposition => "inline" )
end
somebody has any idea ?
thnx.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---