Hi Frappe Team ,
First of all, thank you for building such a powerful and flexible framework โ weโre using ERPNext v15 and absolutely love the modularity!
I wanted to request some technical guidance on a feature enhancement for the Attach field.
Current Behavior:
- The built-in fieldtypes โ Attach and Attach Image โ support only single file uploads.
- When uploading files, we only get a choice to store in either the public or private folders.
- There is no option to:
- Select from custom folders like
/files/products/
- Or create a new folder during upload
- Select from custom folders like
My Suggested Enhancements:
- Allow uploading multiple files via Attach field (like how the attachments section works).
- Show a dropdown of folders (public ones under
/files
) for user to select upload destination. - Allow user to create a new folder dynamically inside the upload dialog.
- Save uploaded files in the selected or created folder.
My Question:
I know this is not available out of the box (yet), but Iโd like to know from the Frappe team or community:
Can we implement this behavior via a custom app or custom fieldtype?
If yes:
- What would be the recommended approach to override or extend the
Attach
field? - How can we hook into or replace the file upload dialog (
frappe.ui.FileUploader
) to inject folder logic? - Is there a better approach youโd recommend (e.g., extending attachments sidebar instead)?
Any technical pointers, references, or file/class names to look at would be extremely helpful!