spaces storage works locally but not in production

Posted September 27, 2021 100 views
DigitalOcean SpacesLaravel

Running locally in Laravel sail container, using league/flysystem-aws-s3-v3. It stores correctly in spaces.

All the credentials remain the same in production and I get

Found 1 error while validating the input provided for the GetObject operation: [Key] expected string length to be >= 1, but found string length of 0

I set CORS to allow all methods, header to *. I use cloudflare but set the proxy to DNS-only.

It is on a subdomain.

The error definitely occurs on Storage::disk(‘spaces’). When I change the disk to local the error goes away.

Anyone experience this?



These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

found issue in the code.