I would like to upload images, PDFs, whatever to Frappe, all without specifying a specific DocType. That is without attaching or linking to a particular doc.
Is this possible at all?
I would like to upload images, PDFs, whatever to Frappe, all without specifying a specific DocType. That is without attaching or linking to a particular doc.
Is this possible at all?
Yes…Just go to File List and upload your files.
Is there any server side script that I can call to show the File Upload button somewhere in Desk?
You can use below python code
def upload_file(name,data):
try:
_file = frappe.get_doc({
"doctype": "File",
"file_name": name,
"content": data,
"is_private":0,
"decode": 1})
_file.save(ignore_permissions = True)
return _file
except Exception as e:
frappe.log_error(frappe.get_traceback())
Wow! Fantastic! Thank you!
Is this server side code able to return the file list to front end JS?
How about front end Client Side script? How should I bring up the UI element in Desk?