jeudi 17 septembre 2020

How to Play Video in blade view stored in Storage in Laravel 5.5

I have saved videos through laravel in database and also in storage folder. I also make a symbolic link of storage with public. store method is given below

$video = $request->file('video');
           
            $name = $video->getClientOriginalName();
           
            $fileName = time() . $name;
            
            
            $url = Storage::url('videos/'. $fileName);
            
            Storage::putFile('videos', new File($video));
            
            $vid = new TV();
            $vid->video = $url;
            $vid->save();

and In my view, I am accessing like this

<div class="col-md-12">
 <video width="1100" height="400" controls>
    <source src="" type="video/mp4">
   
  </video>
</div>

but I am getting the message The requested resource /storage/videos/1600260379Recording%20 was not found on this server.

What is the solution to my problem? Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire