浏览代码

exclude starting from file_url

version-14
Saurabh 9 年前
父节点
当前提交
78abc28a38
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      frappe/core/doctype/file/file.py

+ 1
- 1
frappe/core/doctype/file/file.py 查看文件

@@ -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))


正在加载...
取消
保存