I have a issue with moving images on digitalocean. I’m using the following code:
Storage::disk('do-spaces')->move('xxx/uploads/temp/'.$image_name_request, 'xxx/dps/images/'.$image->image_filename);
source: https://laravel.com/docs/5.5/filesystem
I did the following checks:
$image_name_request and $image->image_filename are setAny idea what i’m doing wrong or a way to debug this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @mbodo,
This will require some troubleshooting.
Firstly, what I see, it’s possible Laravel doesn’t recognize ‘do-spaces’ as a configured disk.
Add DigitalOcean Spaces as a configured disk in Laravel
composer require league/flysystem-aws-s3-v3
Config/filesystems.php file :do_spaces' => [
'driver' => 's3',
'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'),
],
DO_SPACES_KEY=
DO_SPACES_SECRET=
DO_SPACES_ENDPOINT=sfo2.digitaloceanspaces.com (example) DO_SPACES_REGION=SFO2 (example)
DO_SPACES_BUCKET=NAME_OF_YOUR_SPACE
Once you’ve added the above, you should be able to use the ‘s3’ driver for your disk.
Regards, KDSys
We were not able to fix the move command. We solved it by uploading to the new location after that deleting the file from the old location.
With regards to moving/copying directories, this is a useful link: https://github.com/thephpleague/flysystem-aws-s3-v3/issues/128
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.