Have .csv files be downloaded

So that users can open it in LibreOffice/OpenOffice/Word without having to save it to disk beforehands
master
pictuga 2014-02-05 00:37:12 +01:00
parent 6c33bb6e1c
commit a1f5c3db3a
1 changed files with 1 additions and 0 deletions

View File

@ -704,6 +704,7 @@ def cgi_app(environ, start_response):
headers['content-type'] = 'application/json' headers['content-type'] = 'application/json'
elif options.csv: elif options.csv:
headers['content-type'] = 'text/csv' headers['content-type'] = 'text/csv'
headers['content-disposition'] = 'attachment; filename="feed.csv"'
else: else:
headers['content-type'] = 'text/xml' headers['content-type'] = 'text/xml'