use util.py3_path for web attachment filenames (#2353)

Web attachment filenames must be passed as a string for Python 3
This commit is contained in:
dopefishh 2016-12-29 11:38:27 +01:00 committed by Johnny Robeson
parent 413666a825
commit 8bb703619f

View file

@ -206,7 +206,7 @@ def item_file(item_id):
response = flask.send_file(
util.py3_path(item.path),
as_attachment=True,
attachment_filename=os.path.basename(item.path),
attachment_filename=os.path.basename(util.py3_path(item.path)),
)
response.headers['Content-Length'] = os.path.getsize(item.path)
return response