Skip to content
Snippets Groups Projects
Commit af74d5ad authored by Kevin S. Hahn's avatar Kevin S. Hahn
Browse files

adds content-disposition header to get_file

parent 134245e3
No related branches found
No related tags found
No related merge requests found
......@@ -201,6 +201,7 @@ class Container(base.RequestHandler):
self.response.app_iter = open(filepath, 'rb')
self.response.headers['Content-Length'] = str(file_info['size']) # must be set after setting app_iter
self.response.headers['Content-Type'] = 'application/octet-stream'
self.response.headers['Content-Disposition'] = 'attachment; filename=%s' % str(filename)
else:
ticket = util.download_ticket('single', filepath, filename, file_info['size'])
tkt_id = self.app.db.downloads.insert(ticket)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment