How to make all attachments private as default in the upload window

How to make all attachments private as default in the upload window ?

Hey @markgates ,

Try frappe/upload.js at 880d824b77d2a6392a5d8ae9ea7db22199513c91 · frappe/frappe · GitHub

to change the line to
file => Object.assign(file, {is_private: opts.is_private || 1})

so be default all the attachment will be made private

Seems like the upload handling was a bit changed in latest version.

Does anybody have a tip how to default/set all upload to private?

Thanks!

you can try adding the following to line 21 under the if block:
opts.is_private = 1;

Seems like the current, relevant files are:
https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/file_uploader/index.js
and

So maybe this needs adaption?

I’ll give it a try…

I dont really make progress here… :frowning:

image

even tried to set default of is_private on the File to 1. no success…

I tried to set default of is_private to 1 on the File DocType customization and it works fine on the desktop browser but no luck on the mobile browser.

On the mobile or Tab browser, attachments are not private as default.

Any suggestion on this issue since the system behaviour changes on the layout change (desktop to mobile)?

Installed Apps

ERPNext: v12.25.0 (HEAD)
Frappe Framework: v12.22.2 (HEAD)

Issue created on github,

https://github.com/frappe/erpnext/issues/28780

Simple frappe app to make all attachments as private

2 Likes