Send_data not working properly with link_remote_to


I’m reading an image in an link_to_remote call,and then using send_data
i send the read image as :type => “image/png” :disposition =>
“inline”…but when the div tag gets updated i see only ascii characters
…but if i do the same operation using normal call(link_to) i see it
functioning normal …could someone explain .

my view:
<%= link_to_remote(“flip”,
:update => “img”,
:url => {:action => “flip”}

def flip
ilist =
send_data(@out,:filename =>‘workshopimage’, :type => “image/png”,
:disposition => “inline”)

the above doesnt work
but with my view as
<%= link_to(“flip”,
:action => “flip”
it works…so doesnt it mean i need to do some thing more incase of an
ajax call …am i missing something …?