To offer files for download, use send_file
.
def download(file)
send_file file.path, :disposition => 'attachment'
end
Note that a send_file
replaces the default :render
action.
Posted by Dominik Schöler to makandra dev (2011-07-26 18:19)
To offer files for download, use send_file
.
def download(file)
send_file file.path, :disposition => 'attachment'
end
Note that a send_file
replaces the default :render
action.