Pārlūkot izejas kodu

added get_file_url method

version-14
Rushabh Mehta pirms 11 gadiem
vecāks
revīzija
71b097f756
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. +4
    -0
      webnotes/utils/file_manager.py

+ 4
- 0
webnotes/utils/file_manager.py Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt