Flowdock

Notes posted by jassa

RSS feed
October 7, 2012
0 thanks

Send with filename

The Content-Disposition response header holds the suggested attachment filename (i.e. “attachment; filename=fname.ext”)

Set the :disposition option to pass this name.

Controller

http = Net::HTTP.new(@page.host)
res = http.post(path, info.to_query, headers)
send_data res, :content_type => res.content_type, :disposition => res["Content-Disposition"], status: res.code