Merge pull request #1346 from saurabh6790/fixes
exclude starting '/' from file_url
This commit is contained in:
commit
b38ccdc955
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ class File(NestedSet):
|
|||
if self.file_url:
|
||||
if self.file_url.startswith("/files"):
|
||||
try:
|
||||
image = Image.open(frappe.get_site_path("public", self.file_url))
|
||||
image = Image.open(frappe.get_site_path("public", self.file_url.lstrip("/")))
|
||||
filename, extn = self.file_url.rsplit(".", 1)
|
||||
except IOError:
|
||||
frappe.msgprint("Unable to read file format for {0}".format(self.file_url))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue