{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:48:07Z","object_id":{"id":1329,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_filestore","title":"mod_filestore","uri":"https:\/\/zotonic.com\/id\/1329"},"seq":1000000}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"refers":{"objects":[{"created":"2026-10-07T21:20:18Z","object_id":{"id":1329,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_filestore","title":"mod_filestore","uri":"https:\/\/zotonic.com\/id\/1329"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"subject":{"objects":[{"created":"2026-09-09T13:48:09Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:09Z","object_id":{"id":2566,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_operator","title":"Operator","uri":"https:\/\/zotonic.com\/id\/2566"},"seq":2},{"created":"2026-09-09T13:48:09Z","object_id":{"id":2581,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_file_storage","title":"File storage","uri":"https:\/\/zotonic.com\/id\/2581"},"seq":3},{"created":"2026-09-09T13:48:09Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":4},{"created":"2026-09-09T13:48:09Z","object_id":{"id":2632,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_file_store","title":"File store","uri":"https:\/\/zotonic.com\/id\/2632"},"seq":5},{"created":"2026-09-09T13:48:09Z","object_id":{"id":2689,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_reliability","title":"Reliability","uri":"https:\/\/zotonic.com\/id\/2689"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2140,"is_a":["text","documentation","reference","model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2140"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_model_model_filestore","page_url":{"en":"https:\/\/zotonic.com\/docs\/2140\/filestore","x-default":"https:\/\/zotonic.com\/docs\/2140\/filestore"},"preview_url":null,"resource":{"version":3387,"pivot_location_lat":null,"title":"filestore","is_authoritative":true,"body":"<p>Read filestore configuration and statistics through <code>m.filestore<\/code>, for example\n<code>{{ m.filestore.service }}<\/code> or <code>{{ m.filestore.stats.cloud }}<\/code> in an admin template.\nAll model paths below require an administrator context; unauthorized calls return\n<code>{error, eacces}<\/code>. The secret is also unavailable when system configuration is locked.\nSee <a href=\"\/id\/doc_module_mod_filestore\" class=\"doc-reference doc-reference-module\"><code>module#mod_filestore<\/code><\/a> for setup, protocols, configuration precedence and migration.<\/p>\n<h2>File registry and upload queue<\/h2>\n<p>The <code>filestore<\/code> table records each relative local path, its backend (<code>s3<\/code>, <code>ftp<\/code>,\nor <code>webdav<\/code>), full remote URL and size. It also tracks local copies, errors, deletion\nand moves back to local disk. Use the filestore APIs rather than editing the table.<\/p>\n<p>Paths are relative to the site&#39;s files directory, for example\n<code>archive\/2026\/10\/07\/image.jpg<\/code>. Remote locations retain the URL used for upload;\nchanging configuration does not rewrite them or move the remote files.<\/p>\n<p>The <code>filestore_queue<\/code> table holds pending uploads. Entries become eligible after\none minute; bounded background batches and backoff determine when they complete.\nStatistics are database-derived counts and estimates, not remote or local disk scans.<\/p>\n<h2>Available Model API Paths<\/h2>\n<table class=\"table\"><thead><tr><th>Method<\/th><th>Path pattern<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>get<\/code><\/td><td><code>\/stats\/...<\/code><\/td><td>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.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/service\/...<\/code><\/td><td>Return the configured filestore backend service identifier from <code>filestore_config:service\/1<\/code> (admin-only).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/s3url\/...<\/code><\/td><td>Return the configured S3, FTP\/FTPS or WebDAV base URL used for remote object location resolution (admin-only).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/s3key\/...<\/code><\/td><td>Return the configured S3 access key or FTP\/WebDAV username for filestore credentials (admin-only).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/s3secret\/...<\/code><\/td><td>Return the configured S3 secret key or FTP\/WebDAV password only when caller is admin and filestore config is not locked.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_config_locked\/...<\/code><\/td><td>Return whether filestore credential\/config values are locked (non-editable\/hidden) in this site instance (admin-only).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_upload_enabled\/...<\/code><\/td><td>Return whether background upload\/offload from local <code>files<\/code> storage to remote filestore is enabled (admin-only).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/is_local_keep\/...<\/code><\/td><td>Return whether local files are retained after successful remote storage, instead of being scheduled for deletion (admin-only).<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/delete_interval\/...<\/code><\/td><td>Return the configured extra delay before deleting files marked for remote deletion (admin-only).<\/td><\/tr><\/tbody><\/table>\n<p><code>\/+name<\/code> marks a variable path segment. A trailing <code>\/...<\/code> means extra path segments are accepted for further lookups.<\/p>","slug":"filestore","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"ca7de1f2bf075ab2f77fc39ef9de37a9ace12dff9e7aade28f94025472a7d347","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":322,"is_a":["meta","category"],"name":"model","title":"Models","uri":"https:\/\/test.zotonic.com\/id\/322"},"doc_source_path":"apps\/zotonic_mod_filestore\/src\/models\/m_filestore.erl","publication_start":"2023-01-30T19:23:57Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_filestore\/src\/models\/m_filestore.erl","pivot_location_lng":null,"doc_source_kind":"model","name":"doc_model_model_filestore","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:48:07Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_filestore","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"c34f80c7ab6700e5d77ac5730deaae0e4710e159\n","erlang_module":"m_filestore","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-19T13:18:29Z","title_slug":"filestore"},"uri":"https:\/\/zotonic.com\/id\/2140","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2140"}},"status":"ok"}