How can we remove of 'Optimize' and 'Private' option with default value during attachment

Hi all,

How can we remove of ‘Optimize’ and ‘Private’ options with default value Optimize=NO, Private=NO during attachment?
Note: Please refer the screenshot for your reference.

Thanks in advance.

You have to remove it from the core file.

How to override this vue js file?

Hi Parthiban,

Hope u found a solution for your request. I am also facing the same incident could u please guide me to hide or remove the private and optimize button.

Regards,
Balram Singh

We have not got the solution yet? I asked developer to check with the Frappe team on Daily Office Hours meeting as technical query. You can also try the same.
Also please let me know if you got a solution.
Thanks

Sure will let u know if there any solution we find

Has there been any progress on this? I consider this a bug. In the file doctype default value for is_private field is ignored. Newly uploaded files always have is_private marked as true. Since frappe is overriding this, there should be a comment why the default value will always be ignored.

It seems this topic has come up and the function has changed back and forth several times over the years. Why not empower the user and let the admins decide if the default should be private or not. This is a simple function of “default value” in all doctype fields. Why is frappe overriding this?

Is there any way to implement this to stay? Like override?
Working on Code in core frappe isn´t a stable option for any serious production app. Would love to see there a possibility.

For those who want to hide the Set all Private button & Private checkbox refer the given github repo GitHub Link to App.
Use the branch frappe-file-override.

Use the following commands

  1. bench get-app GitHub - kakde-sandeep/frappe_cookbook: Frappe code snippets for various use cases --branch frappe-file-override
  2. bench install-app frappe_cookbook
    And if these buttons do not get removed then run
  3. bench build --app frappe_cookbook

This app uses app_include_js for overriding the JS files.