From c92de6e53921c80a20b56c745fa5f88ccf7a3093 Mon Sep 17 00:00:00 2001 From: Jan Broer Date: Thu, 6 Aug 2015 04:10:47 +0200 Subject: [PATCH] Fix filename of book download (was pre- and suffixed with single quotes) --- cps/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index 3fc270dd..c17e5535 100755 --- a/cps/web.py +++ b/cps/web.py @@ -289,7 +289,7 @@ def get_download_link(book_id, format): data = db.session.query(db.Data).filter(db.Data.book == book.id).filter(db.Data.format == format.upper()).first() helper.update_download(book_id, int(current_user.id)) response = make_response(send_from_directory(os.path.join(config.DB_ROOT, book.path), data.name + "." +format)) - response.headers["Content-Disposition"] = "attachment; filename='%s.%s'" % (data.name, format) + response.headers["Content-Disposition"] = "attachment; filename=%s.%s" % (data.name, format) return response @app.route('/login', methods = ['GET', 'POST'])