Displaying 1 result from an estimated 1 matches for "retrieve_photo_path".
2009 Nov 08
2
send_data with jpeg not working
...:type => "image/
jpeg", :disposition => "inline"
end
def download
@photo = Photo.find(params[:id])
send_file @photo.abs_img_path, :type => "image/jpeg", :filename =>
@photo.filename
end
In my html.erb file I have the following tags:
<%= image_tag retrieve_photo_path(@photo) %>
.....
<%= link_to "Download photo", download_photo_path(@photo) %>
I get a broken image in the browser. I see the html src correctly has
the image tag <img src="photos/5/retrieve"/>. If I browse directly to
"http://www.myapp.com/photos/5/retriev...