From 6c6ae5a7c05ae33b8cec0a0abd6b394024fa4a76 Mon Sep 17 00:00:00 2001 From: Zach Denton Date: Sun, 26 Aug 2012 15:19:03 -0400 Subject: [PATCH] Send correct filename when downloading a file. --- 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 4697ffd65..33074b212 100644 --- a/beetsplug/web/__init__.py +++ b/beetsplug/web/__init__.py @@ -77,7 +77,7 @@ def all_items(): @app.route('/item//file') def item_file(item_id): item = g.lib.get_item(item_id) - return flask.send_file(item.path) + return flask.send_file(item.path, as_attachment=True, attachment_filename=os.path.basename(item.path)) @app.route('/item/query/') def item_query(query):