Directory structure for Uploaded files

Hi,

Right now when attaching documents, they all end up in the same directory.
Even though it doesn’t really matter (unless you have 50.000+ files in there), I believe it would be a great idea to have some sort of weighted tree as well as a top-level placing them in context from where they where uploaded, i.e.

files/
    Buying / 
        Supplier Quotation / 
            Supplier-XY-quote-170319-A01.pdf

I also found that once a file is attached, in the side-bar, it kind of looses context as we can’t see if it’s public or private, edit that setting and so on. It wouldn’t hurt with some sort of file-type/tag as well, say for an expense there might be a mandatory receipt picture or pdf that must be supplied. It would be nice if that could be defined and visualised somehow, still offering the option to attach any other file to that document.

Related,
I believe attached documents like a receipt or a “paper-copy” of an official invoice shouldn’t be possible to remove once the invoice has been submitted.

Thoughts?

@raveslave

Would you mind creating a github feature suggestion for the same.
Thanks for your cooperation.

Hi @ArundhatiS
I created one here: Attachments: Storage paths and UI improvements · Issue #14720 · frappe/frappe · GitHub