youtube icon indicating copy to clipboard operation
youtube copied to clipboard

filesize(): stat failed error

Open Naveedali1234 opened this issue 2 years ago • 1 comments

Hi :)

thank you for this easy package. i have an issue with the video upload. i first upload the video to my project folder using below code:

`if ($this->uploaded_video) {

        $filename = $this->uploaded_video->getFilename();
        $this->uploaded_video->storeAs('public/instruction-videos', $filename);
    }`
    

it's uploaded successfully to project folder and i can access the video in browser by getting the url from below code

$fullpath = asset('storage/instruction-videos/'.$filename);

i can see the video in browser by accessing the path which i get from the above code snippet.

i upload the video to youtube using below code

$video = Youtube::upload($fullpath, [ 'title' => 'title', 'description' => 'description' ],'unlisted');

but i get the below error when i upload it to youtube Screenshot from 2022-08-17 18-12-44

Naveedali1234 avatar Aug 17 '22 13:08 Naveedali1234

$fullpath should be absolute path to file on server, not public url.

$fullpath = Storage::disk('local')->path($filename)

sharipovmarat avatar Sep 20 '22 18:09 sharipovmarat