I’ve been searching around the forums and issue tracker for a way to manage default publicity levels when uploading files. To date, I’ve only found unanswered questions on discuss.frappe.io and github issues that haven’t really addressed a configurable default in any meaningful way. Looking at the code and the way it currently appears to work, it goes something like this:
Is the file an image?
- No: mark the file as private
- Yes: make it public
There is also a checkbox at the top of the form that adds to the confusion. It says “Make all attachments private” (unchecked), but it doesn’t have anything to do with the initial public/private status of the upload.
If this is indeed the way default publicity levels work on file uploads, it is inadequate for us. In our case, we work with our client’s images, and we don’t want the liability that comes with publishing their images online, even if nothing links to them. Sure, we can address this to an extent with training, but employees are only human and files will be uploaded publicly.
Here are a couple examples of questions on discuss.frappe.io. None of them have workable solutions:
- Set File as public by default on specific attach field (no answer)
- How to make all attachments private as default in the upload window - #2 by ROHAN_JAIN1 (the solution proposed in this question involves forking frappe, and it no longer works for the current version)
Some issues on github:
- Feature Request - System Setting for making file uploads private · Issue #10713 · frappe/frappe · GitHub
- feat(System Setting): Option to set private attachments globally by kickapoo · Pull Request #6740 · frappe/frappe · GitHub
Is there any way to make the default for uploaded images private that doesn’t involve forking frappe? A setting, or some way to change the default behavior via code?