Ad

How To Assign Permission To Storage Directory In My Laravel Application

- 1 answer

I created a video player project in laravel. the video will play from only authenticated users. using the inspect element if anyone gets a video link that is will not download from anyone.

video store location in storage/app/

Ad

Answer

The storage should not be available for clients accessing your server's files. They should only have access to the public folder. What I normally do is creating a route for accessing files in my storage folder. In this route you can check if you want to give access to the file.

Have also a look at https://laravel.com/docs/5.8/filesystem#downloading-files

Ad
source: stackoverflow.com
Ad