I can see that uploaded contents are stored in the private folder without folder structure. Guess my custom folder structures will be reflected.
One question related to that. Is there a way to use external folders outside of frappe installation? (I’m on self-host server)
For other services, I usually rely on CNAME based CDN which is mapped to a subdomain via Nginx. Like image.example.com points to /var/www/image folder by Nginx. I run rsync to another remote storage to make sure it is fully backed-up, and add that path to Nginx’s server block for failover case. Together with CDN plugin/module, Nginx, and rsync at server level, I care a little less of my primary server’s stability.
I would like to have similar experience with Frappe Drive. But just adding symlink from external folder disables loading my personal images. Likely it is due to permission issue, guessed based on this doc, Files
My next option is to mount an external storage disk to that particular private folder and run GlusterFS with that, but I would like to rely on Frappe native solutions first, if there is any.
Yeah, on disk storage mechanism will be moved around. There are a few changes on the roadmap that should help with custom setups a lot. Namely, a custom root directory for Drive. Currently, within bench/files, Drive currently just makes a $user_directory for each user and flat stores the files.
These will most likely be moved to bench/files/drive/$user_directory. So all drive files will point to the root directory. You can point glusterFS or some other tool for S3 to that root directory.
Currently, this limitation of only allowing file uploads through the client is simple. There’s no mechanism to watch for changes on the filesystem and update the DB accordingly. So when you upload through the client, the database updates first and then the FS so I can guarantee that the file exists and is on the disk. Once I add a way for the DB to update based on the FS then something like this should be fine.
OK. I thought the fact that symlinked image files (uploaded through Frappe Drive) appear without thumbnails is due to file permissions, but seems like it is something else. I will further dig into it.