Update file.py

This commit is contained in:
Himanshu 2019-07-22 11:15:31 +05:30 committed by GitHub
parent 27b6bcd757
commit a94befbc21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -683,7 +683,7 @@ def get_web_image(file_url):
frappe.msgprint(_("Unable to read file format for {0}").format(file_url))
raise
image = Image.open(StringIO(str(r.content)))
image = Image.open(StringIO(frappe.safe_decode(r.content)))
try:
filename, extn = file_url.rsplit("/", 1)[1].rsplit(".", 1)