file upload to spaces via Laravel app not working in production

Uploading files to spaces via Laravel app hosted on app platform return internal error but works fine on local host. any help be will much appreciated.

Submit an answer
Answer a question...

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!

Sign In or Sign Up to Answer

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.

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
August 3, 2022

Hi @bubblytealsnorkler,

Do you see any relevant logs in the control panel? If you are not seeing any logs at all, make sure to use the stack log driver and configure it to log to the stderr channel.

If you are using the default config/logging.php, I believe all you need to do is set a LOG_CHANNEL=stderr environment variable.

You’re not using a public directory, you’re using public_html. I don’t like this strategy. Make a public directory in public_html and set the the url to env(‘APP_URL’).‘/public/storage’.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.