浏览代码

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


正在加载...
取消
保存