From 8a431033fc1c985554a030a06e8ce3ff2166d424 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Wed, 27 May 2026 09:38:22 +0100 Subject: [PATCH 1/2] Document configurable storage location for files fieldtype --- content/collections/pages/forms.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/content/collections/pages/forms.md b/content/collections/pages/forms.md index f3ef728d7..314f19e12 100644 --- a/content/collections/pages/forms.md +++ b/content/collections/pages/forms.md @@ -542,6 +542,30 @@ fields: container: main ``` +### Configuring temporary file storage + +When using the `files` fieldtype, uploads are temporarily stored on your server before being attached to emails and then deleted. By default, these files are stored on the `local` disk at `storage/app/private/statamic/file-uploads`. + +In multi-server environments where a file might be uploaded on one server but processed (eg. queued form emails) on another, you can configure the storage location to use a shared filesystem like S3: + +```env +STATAMIC_FILE_UPLOADS_DISK=s3 +STATAMIC_FILE_UPLOADS_PATH=statamic/file-uploads +``` + +Or in your `config/statamic/system.php` file: + +```php +'file_uploads' => [ + 'disk' => env('STATAMIC_FILE_UPLOADS_DISK', 'local'), + 'path' => env('STATAMIC_FILE_UPLOADS_PATH', 'statamic/file-uploads'), +], +``` + +:::tip +Since these are temporary files containing user uploads, you should use a private filesystem to prevent unauthorized access. +::: + ## Honeypot Simple and effective spam prevention. From 2ae483ff39d4a606655b713ee0a202a0b31b8a22 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Thu, 16 Jul 2026 09:19:13 +0100 Subject: [PATCH 2/2] config options have been flattened --- content/collections/pages/forms.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/content/collections/pages/forms.md b/content/collections/pages/forms.md index d3b8ff6c0..ea3b6f7c2 100644 --- a/content/collections/pages/forms.md +++ b/content/collections/pages/forms.md @@ -556,10 +556,8 @@ STATAMIC_FILE_UPLOADS_PATH=statamic/file-uploads Or in your `config/statamic/system.php` file: ```php -'file_uploads' => [ - 'disk' => env('STATAMIC_FILE_UPLOADS_DISK', 'local'), - 'path' => env('STATAMIC_FILE_UPLOADS_PATH', 'statamic/file-uploads'), -], +'file_uploads_disk' => env('STATAMIC_FILE_UPLOADS_DISK', 'local'), +'file_uploads_path' => env('STATAMIC_FILE_UPLOADS_PATH', 'statamic/file-uploads'), ``` :::tip