瀏覽代碼

added get_file_url method

version-14
Rushabh Mehta 11 年之前
父節點
當前提交
71b097f756
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. +4
    -0
      webnotes/utils/file_manager.py

+ 4
- 0
webnotes/utils/file_manager.py 查看文件

@@ -10,6 +10,10 @@ from webnotes import conf

class MaxFileSizeReachedError(webnotes.ValidationError): pass

def get_file_url(file_data_name):
data = webnotes.conn.get_value("File Data", file_data_name, ["file_name", "file_url"], as_dict=True)
return data.file_name or data.file_url

def upload():
# get record details
dt = webnotes.form_dict.doctype


Loading…
取消
儲存