Please save the document before uploading. We need to change that

Hello everyone,
one of the most frequent demands and complaint of my clients is why we can not attach the file before saving ??
I made several solutions for each based on the needs …

My question is … why did you limited attachment only to saved docs?
based on your answer we may find a better way than waiting for the save of the doc.
best regards for the best community

We need to save the document before attaching because we need reference name of that doc.

Let’s see one example,
I am attaching one document to lead. If I don’t have the reference number of that Lead then how can I find attached doc?

That’s why ERPNext added this feature.
You can refer below the screen and can check that each file has Attached To Name field.

first thanks for your reply
I understand the current scenario clearly …
and really you can not call it a feature … most people call it a bug when I show it to the end customer.
one example is the mandatory attach field for new doc …
throwing “Please save the document before uploading” is not the answer …
one fix is to upload the moment the doc is saved …
and on the other hand, attached to doctype and Attached to name are not mandatory fields
if you used files example

if think we should reconsider how attachment work currently …
we can upload the file and after that attach it if the doc created correctly and deleted if something goes wrong … we have many solutions to fix the current state
best regards

why not just send a PR for such a solution if you believe that adds up to usage of ERPNext in general?