Displaying 1 result from an estimated 1 matches for "find_by_item_id_and_size".
2005 May 07
0
Displaying images from PostgreSQL large objects
.../data
at http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles but all
the images that get sent are corrupted, apparently. Do I need to do
something different because it''s a large object?
Here''s the snippet of code that should send the image:
def showimage
@thumb = Thumbnail.find_by_item_id_and_size(@params[''id''], ''med'')
send_data @thumb.file_id, :type => "image/jpeg", :filename =>
@thumb.item_id.to_s + "-" + @thumb.size + ".jpg", :disposition =>
"inline"
end
file_id is the name of the field that holds the l...