Report this

What is the reason for this report?

Config DO Spaces in Laravel 11 doesn't work 🤨

Posted on June 28, 2024

Hello !

I have a trouble with the configuration of my DigitalOcean space in my Laravel application. I created a fresh new blank project with laravel new but the problem still here.

So this is my config : .env

DO_ACCESS_KEY_ID=MY_KEY
DO_SECRET_ACCESS_KEY=MY_SECRET_KEY
DO_DEFAULT_REGION=FRA1
DO_BUCKET=nody
DO_ENDPOINT=https://nody.fra1.digitaloceanspaces.com

filesystem.php

'do' => [
  'driver' => 's3',
  'key' => env('DO_ACCESS_KEY_ID'),
  'secret' => env('DO_SECRET_ACCESS_KEY'),
  'region' => env('DO_DEFAULT_REGION'),
  'bucket' => env('DO_BUCKET'),
  'endpoint' => env('DO_ENDPOINT'),
],

Then I modify my route to make a basic test :

Route::get('/', function () {
    Storage::disk('do')->put('test.txt', 'Hello, DigitalOcean Spaces!');
    return view('welcome');
});

(Yes I have install “league/flysystem-aws-s3-v3” package) Nothing happen and I don’t know how I can get feedback on what’s going on under the hood :(

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.