How to add a private files in Employee doctype

hi
in employee doctype i want to add a private files like national id and passport images
i added anew section break with PERm level and under this section i added attached field
but when i add attachment employee can see the files under ATTACHMENTS in the left
how can i upload this files into the doctype and prevent user to see them

1 Like

i get around this problem but i think this to child table and upload what i want in this table
but i think this is not Professional

If you want to control Attachments with permissions levels, create Fields with fieldtype as Attach.

1 Like

thank you for your replay
i did this but the problem is after i upload the file the user can see all attachment files in ATTACHMENTS
in the left panel under ASSIGNED TO

Dont upload files using the left sidebar. Attach it in the form itself.

1 Like

A question in the form of a statement: Files on the left sidebar are stored in /public... and files with the attach as shown are stored in the db?

i attach in the form itself and it also shown in sidebar

Do the side attachments show if you log in as a user with restricted permission?

yes
it’s shown

Ok my bad. I think we don’t have any permissions for Files attached in a doctype.

@fatheyabdelslam Will you open a feature request at Issues · frappe/frappe · GitHub

2 Likes

Sure

https://github.com/frappe/frappe/issues/5894

1 Like

Is there any workaround for this? I have the same issue. I want to hide attachments in Employee Doctype from all but it’s in the public folder. Can anyone please help me.

You can use child table

Thanks youssef for the update. Can you please explain a bit on using child table. Any example would really put me in the right direction

Thanks

It is a kind of circumvention of the problem that is not a professional solution to it.
You can check these links for child table

https://erpnext.com/docs/user/manual/en/customize-erpnext/articles/child-table-

1 Like