© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
barrerakj

Configure Spatie Media Library plugin to upload to Digital Ocean

Ok, I installed the plugin, all good. Then, I created a DO Spaces bucket, add the CORS config, then in Laravel installed the required packages, added the disk with the name 'digitalocean', and it worked good. When I do a simple
Storage::put('file.txt', 'Contents of the file');
Storage::put('file.txt', 'Contents of the file');
in Tinker to test, it actually creates a file in DO Spaces. All good here.

However, when I use the field, and try to add images, those images are saved correctly, except that they go to the public disk. I already change the FILESYSTEM_DISK variable in .env to 'digitalocean' and already change the config in filesystems.php like this

'default' => env('FILESYSTEM_DISK', 'digitalocean'),
'default' => env('FILESYSTEM_DISK', 'digitalocean'),


I also made sure to publish the media-library.php config, and change the disk_name to this

'disk_name' => 'digitalocean',
'disk_name' => 'digitalocean',


Actually, the livewire part of the field performs a temporary file upload, and if I specify the 'digitalocean' disk in the livewire.php config file, it actually works.

So, when I save the file, why is Media Library still sending the files to the public disk? Is there any other config that I need to change?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Spatie media digital ocean spaces, folders
FilamentFFilament / ❓┊help
2y ago
filament spatie media library plugin
FilamentFFilament / ❓┊help
13mo ago
Spatie Media Library temporary upload location?
FilamentFFilament / ❓┊help
2y ago
spatie-laravel-media-library-plugin events ?
FilamentFFilament / ❓┊help
3y ago