okay here's the solution (graciously provided by someone on
stackoverflow.com) --

I modified the retrieve action in my controller to use File.open
first:

def retrieve
  @photo = Photo.find(params[:id])
  File.open(@photo.abs_img_path, 'rb') do |f|
    send_data f.read, :type => "image/jpeg", :disposition => "inline"
  end
end

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to