fixed issue 1978, thanks mbelletti

This commit is contained in:
mdipierro
2015-01-12 21:00:49 -06:00
parent 15bf3e2ede
commit 57c5fb64f6
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.9.12-beta+timestamp.2015.01.12.20.53.19
Version 2.9.12-beta+timestamp.2015.01.12.21.00.43
+3 -1
View File
@@ -2348,7 +2348,9 @@ class SQLFORM(FORM):
# expcolumns is all cols to be exported including virtual fields
rows.colnames = expcolumns
oExp = clazz(rows)
filename = '.'.join(('rows', oExp.file_ext))
export_filename = \
request.vars.get('_export_filename') or 'rows'
filename = '.'.join((export_filename, oExp.file_ext))
response.headers['Content-Type'] = oExp.content_type
response.headers['Content-Disposition'] = \
'attachment;filename=' + filename + ';'