From 91334104a04e445e98fe482980c7979bb01017c4 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Tue, 19 May 2026 12:38:29 -0300 Subject: [PATCH] feat(storage): DigitalOcean Spaces disk + env documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds 'spaces' to config/filesystems.php so self-hosters can switch FILESYSTEM_DISK=spaces without bolting onto the generic s3 disk. Env vars follow the existing R2/AWS convention (SPACES_ACCESS_KEY_ID / SPACES_SECRET_ACCESS_KEY), and use_path_style_endpoint is omitted so the SDK defaults to virtual-hosted style — the canonical request shape for DO Spaces. Also documents the five env vars in .env.example. Docs in the trypost-docs repo describe the matching FILESYSTEM_DISK=spaces stanza. --- .env.example | 7 +++++++ config/filesystems.php | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 4300c9d4..02edf84c 100644 --- a/.env.example +++ b/.env.example @@ -86,6 +86,13 @@ R2_REGION=auto R2_BUCKET= R2_URL= +# DigitalOcean Spaces (set FILESYSTEM_DISK=spaces) +SPACES_ACCESS_KEY_ID= +SPACES_SECRET_ACCESS_KEY= +SPACES_ENDPOINT= +SPACES_REGION= +SPACES_BUCKET= + # ============================================ # Social Platform Credentials # ============================================ diff --git a/config/filesystems.php b/config/filesystems.php index 8c1fd705..f81877c9 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -15,7 +15,7 @@ | */ - 'default' => env('FILESYSTEM_DISK', 'r2'), + 'default' => env('FILESYSTEM_DISK', 'public'), /* |-------------------------------------------------------------------------- @@ -62,6 +62,16 @@ 'report' => false, ], + 'spaces' => [ + 'driver' => 's3', + 'key' => env('SPACES_ACCESS_KEY_ID'), + 'secret' => env('SPACES_SECRET_ACCESS_KEY'), + 'endpoint' => env('SPACES_ENDPOINT'), + 'region' => env('SPACES_REGION'), + 'bucket' => env('SPACES_BUCKET'), + 'throw' => true, + ], + 'r2' => [ 'driver' => 's3', 'key' => env('R2_ACCESS_KEY_ID'),