You could try making a symbolic link to public/storage. You can do this by running this Artisan command php artisan storage:link.
From the Laravel 8 documentation: https://laravel.com/docs/8.x/structure#the-storage-directory
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I have a web application that uploads videos, and I need to get the length time of the video. I am using the getID3 library suggested in: https://laracasts.com/discuss/channels/laravel/video-duration-time :
$video_file = $getID3->analyze('path-to-your-video');
// Get the duration in string, e.g.: 4:37 (minutes:seconds)
$duration_string = $video_file['playtime_string'];
// Get the duration in seconds, e.g.: 277 (seconds)
$duration_seconds = $video_file['playtime_seconds'];
But I'm getting an error when analyzing the video (could not open file, !file_exists, !file_readable). I don't remember the full error, but I believe it's related to the storage permissions, since my videos are private and not public. I am using Windows and XAMPP Server. Is there any way that this can be done/solved?
Thanks all. It really have been long time since I had the problem, and I'm really blocked.
@bljdavidson That didn't work. First, when we call
Storage::('videos')->get('video_name')
This will get us the video file as byte map. That does not work. What I did was the following:
$video = $request->file('lesson_video');
$video_name = time() . "." . $video->getClientOriginalExtension();
$validation['filename'] = $video_name;
$video->storeAs('videos', $video_name);
$path = Storage::path("videos/" . $video_name);
$getID3 = new \getID3;
$video_file = $getID3->analyze($path);
$duration_seconds = $video_file['playtime_seconds'];
I just had to get the path of the file from the Storage Facade, and now it's working. Also, I deleted the configurations from filesystem.php (the one you suggested. I added them before and didn't work).
Thanks all for your help <3
Please or to participate in this conversation.