Attachment in childtable gets saved to draft name of document

Hi
We have created a childtable with attach field. As soon as the user attaches a file, the file is saved but is attached to the document with draft name.


once it is saved the document name is given as 4333

but the file is saved to the draft state name:


File is visible to the person who created the document

but since there is workflow and the document 4333 is shared to supervisor, they are not able to see this attachment

what is best way to resolve this issue?


Uncheck the private checkbox while uploading

Sorry, I can’t make it public, these are employee specific records.

Any thoughts or updates? if anyone has any idea then please let me know. or if anybody knows a default doctype where attachment is stored in childtable then please let me know so that I can check the background code on github on how frappe implements this. thanks.