From 8bb703619f5ecdeb98c637cd46fea2b6e25bf6e5 Mon Sep 17 00:00:00 2001 From: dopefishh Date: Thu, 29 Dec 2016 11:38:27 +0100 Subject: [PATCH] use util.py3_path for web attachment filenames (#2353) Web attachment filenames must be passed as a string for Python 3 --- beetsplug/web/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py index 810de8718..e7b9ec81f 100644 --- a/beetsplug/web/__init__.py +++ b/beetsplug/web/__init__.py @@ -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