Reputation: 2711
I used this tutorial to define a driver and connect to my spaces on Digital Ocean.
In my config\filesystems.php
I have this code:
'spaces' => [
'driver' => 'spaces',
'version' => '2006-03-01',
'key' => env('DO_SPACES_KEY'),
'secret' => env('DO_SPACES_SECRET'),
'endpoint' => env('DO_SPACES_ENDPOINT'),
'region' => env('DO_SPACES_REGION'),
'bucket' => env('DO_SPACES_BUCKET'),
'bucket_name' => env('DO_SPACES_BUCKET'),
],
In one of my controllers iI have this code:
$client->subdomain = 'acme';
$directories_client = Storage::disk('spaces')->directories('clients/'.$client->subdomain);
The connection to spaces
driver works perfectly in my local environment.
However, in remote environment, this line
$directories_client = Storage::disk('spaces')->directories('clients/'.$client->subdomain);
produces error. Here is hat my log says:
[2017-09-29 07:19:08] remote.ERROR: Driver [] is not supported.
{"userId":5,"email":"_________","exception":"[object]
(InvalidArgumentException(code: 0): Driver [] is not supported. at
/.../src/Illuminate/ Filesystem/FilesystemManager.php:124)
The local code works perfectly at the very same time as the remote fails.
Any ideas?
Peter
Upvotes: 1
Views: 811
Reputation: 779
you need use s3
as driver name, just change this
'driver' => 'spaces',
to 'driver' => 's3',
Upvotes: 2