Is it possible to enhance Attach field with folder selection and multi-file support via custom app?

Hi Frappe Team :wave:,

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.


:mag: 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

:white_check_mark: My Suggested Enhancements:

  1. Allow uploading multiple files via Attach field (like how the attachments section works).
  2. Show a dropdown of folders (public ones under /files) for user to select upload destination.
  3. Allow user to create a new folder dynamically inside the upload dialog.
  4. Save uploaded files in the selected or created folder.

:bulb: 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:

:point_right: 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!

You can get help here: