From 962f727283fbaef5b8666609a6770c62f244b7cb Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Mon, 12 Mar 2018 14:37:20 +0530 Subject: [PATCH] save_file for bytes --- frappe/utils/file_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/file_manager.py b/frappe/utils/file_manager.py index 18990a48c5..40b612174a 100644 --- a/frappe/utils/file_manager.py +++ b/frappe/utils/file_manager.py @@ -124,7 +124,7 @@ def save_file(fname, content, dt, dn, folder=None, decode=False, is_private=0, d if isinstance(content, text_type): content = content.encode("utf-8") - if "," in content: + if b"," in content: content = content.split(",")[1] content = base64.b64decode(content)