# File lib/ramaze/helper/send_file.rb, line 20 def send_file(filename, content_type = nil, content_disposition = nil) content_type ||= Rack::Mime.mime_type(::File.extname(filename)) content_disposition ||= File.basename(filename) response.body = ::File.open(filename, 'rb') response['Content-Length'] = ::File.size(filename).to_s response['Content-Type'] = content_type response['Content-Disposition'] = content_disposition response.status = 200 throw(:respond, response) end