I am using Laravel with a local filesystem as storage driver.
I have understood that I can save files in the storage/public
folder to make them accessible through myapp.dev/storage/image.jpg
. I have also understood that I can make images accessible only for authenticated users like explained here.
What I have not understood it the File Visibility property. If files are public depending on the folder that I stored them, why would I need to declare them additionally as private
or public
? Could anyone give a use case where this would be necessary?
File visibility option matters only if you are using cloud storage provider, e.g. Amazon S3 or something like that. If you are working with local file system then that option is ignored.