Support the ongoing development of Laravel.io →
Requests Input Views
Last updated 2 years ago.
0

The storage folder is not public for your visitors. They can't access it unless you stream that file specifically.

You can either use the BinaryFileResponse to stream the files from the storage folder or - the easiest solution - save them in a public folder. (lets stay public/storage)

I've added here an example on how you can stream a file from a private directory: https://gist.github.com/IonutBajescu/27c43a095ebc2442bd20

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.