filestore
Read filestore configuration and statistics through m.filestore, for example
{{ m.filestore.service }} or {{ m.filestore.stats.cloud }} in an admin template.
All model paths below require an administrator context; unauthorized calls return
{error, eacces}. The secret is also unavailable when system configuration is locked.
See module#mod_filestore for setup, protocols, configuration precedence and migration.
File registry and upload queue
The filestore table records each relative local path, its backend (s3, ftp,
or webdav), full remote URL and size. It also tracks local copies, errors, deletion
and moves back to local disk. Use the filestore APIs rather than editing the table.
Paths are relative to the site's files directory, for example
archive/2026/10/07/image.jpg. Remote locations retain the URL used for upload;
changing configuration does not rewrite them or move the remote files.
The filestore_queue table holds pending uploads. Entries become eligible after
one minute; bounded background batches and backoff determine when they complete.
Statistics are database-derived counts and estimates, not remote or local disk scans.
Available Model API Paths
| Method | Path pattern | Description |
|---|---|---|
get | /stats/... | Return admin-only filestore totals: archived media count/size, queued upload count, queued move/delete counts, cloud-stored count/size, and estimated local count/size. |
get | /service/... | Return the configured filestore backend service identifier from filestore_config:service/1 (admin-only). |
get | /s3url/... | Return the configured S3, FTP/FTPS or WebDAV base URL used for remote object location resolution (admin-only). |
get | /s3key/... | Return the configured S3 access key or FTP/WebDAV username for filestore credentials (admin-only). |
get | /s3secret/... | Return the configured S3 secret key or FTP/WebDAV password only when caller is admin and filestore config is not locked. |
get | /is_config_locked/... | Return whether filestore credential/config values are locked (non-editable/hidden) in this site instance (admin-only). |
get | /is_upload_enabled/... | Return whether background upload/offload from local files storage to remote filestore is enabled (admin-only). |
get | /is_local_keep/... | Return whether local files are retained after successful remote storage, instead of being scheduled for deletion (admin-only). |
get | /delete_interval/... | Return the configured extra delay before deleting files marked for remote deletion (admin-only). |
/+name marks a variable path segment. A trailing /... means extra path segments are accepted for further lookups.