what's in .env ?
have you run artisan config:clear
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Anyone did success for upload to Digitalocean spaces for laravel 8
here is my composer
"laravel/framework": "^8.54",
"league/flysystem-aws-s3-v3": "^1.0",
in filesystems.php
'spaces' => [
'driver' => 's3',
'key' => env('SPACES_ACCESS_KEY_ID', '===AAACESS KEY==='),
'secret' => env('SPACES_SECRET_ACCESS_KEY', '===BBBSECRECT KEY==='),
'region' => env('SPACES_DEFAULT_REGION', 'sgp1'),
'bucket' => env('SPACES_BUCKET', 'laravel-spaces'),
'url' => env('SPACES_URL', 'https://laravel-spaces.sgp1.cdn.digitaloceanspaces.com'),
'endpoint' => env('SPACES_ENDPOINT', 'https://sgp1.digitaloceanspaces.com')
],
Tinker upload test
$path = 'thumb.png';
$file = Storage::disk('spaces')->put($path, @file_get_contents(public_path('images/logo.png')));
Errors
Aws\S3\Exception\S3Exception with message 'Error executing "PutObject" on "https://laravel-spaces.s3.sgp1.amazonaws.com/thumb.png"; AWS HTTP error: cURL error 6: Could not resolve: laravel-spaces.s3.sgp1.amazonaws.com (Domain name not found) (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://laravel-spaces.s3.sgp1.amazonaws.com/thumb.png'
*** Execution finished ***
Why append s3 and amazonaws.com to url
And how to solve this
Thanks.
Please or to participate in this conversation.