module Sinatra::Helpers
def attachment(filename=nil)
Set the Content-Disposition to "attachment" with the specified filename,
def attachment(filename=nil) response['Content-Disposition'] = 'attachment' if filename params = '; filename="%s"' % File.basename(filename) response['Content-Disposition'] << params end end