I''ve got a bunch of images stored in a pgsql database as large objects. Currently I use a PHP script to display the images, but I''d like to do it in Rails. I followed the example of sending files/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 large object