Where to put files common to all sites?

I need to upload some files and some of them need to be put in a common place to all sites. This common place can’t be accessed by client side javascript, but only by server side python. Initially i put the files (uploaded) in the sites folder but i realized that when we do bench update he complains with this:

subprocess.CalledProcessError: Command ‘/path/to/frappe-bench/env/bin/frappe --backup folder_name’

bench update tries to make a backup of my folder and there is no need of that.

I can put them in the app public folder but the problem, i think, is that when we update the app the files uploaded will be erased. Is this correct?

The question is where should i put my files in the way that will be common to all sites?


You can out it outside the sites folder and try.

Best place is inside the app itself. Create a folder /data or something - this is easily accessible inside Python scripts

Run bench update --no-backup to skip backup before updating.

Thanks to all for your support.

  • outside the sites as inside sites/database name/public is possible, there aren’t problems. I’m trying to avoid this solution.

  • Run bench update --no-backup is my second solution but not perfect.

  • inside app in a folder /data is the best solution. I will make some tests…

Thanks again.