From 80f87a37fb5d97d06c8c73287cb952f4dc0b185c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 7 Dec 2019 12:50:23 +0530 Subject: [PATCH] fix: not able to download XML file --- frappe/utils/response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/response.py b/frappe/utils/response.py index 8169986e44..1dfbbe5516 100644 --- a/frappe/utils/response.py +++ b/frappe/utils/response.py @@ -210,7 +210,7 @@ def send_private_file(path): blacklist = ['.svg', '.html', '.htm', '.xml'] if extension.lower() in blacklist: - response.headers.add(b'Content-Disposition', b'attachment', filename=filename.encode("utf-8")) + response.headers.add('Content-Disposition', 'attachment', filename=filename.encode("utf-8")) response.mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'