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.