spaces storage works locally but not in production

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?



changed the code to use Amazon S3. Worked fine.

I believe its a CORS issue in production with livewire throwing a 401.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

found issue in the code. resolved.