Is it possible to upload files without attaching to doc?

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.

1 Like

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):
		_file = frappe.get_doc({
		"doctype": "File",
		"file_name": name,
		"content": data,
		"decode": 1}) = True)
		return _file
	except Exception as e:
1 Like

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?