You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
})
->otherwise(function($reason){
if(!$fileStream){
return new Response(404, [
'Content-Type' => 'text/plain'
], "The video doesn't exist on the server.");
}
});
I also have tried passing the $fstream to the ReadableResourceStream and i couldn't been able to return the video stream.
Do you know what its the error?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hi Sergey, i like your book!
I'm having troubbles using the ReadableResourceStream with the async Filesystem utilities:
$filesystem = Filesystem::create($loop);
$file = $filesystem->file($file_path);
$file->open('r')
->then(function($fstream) use($loop, $utilities){
$fstream->on('data', function($chunk) use($utilities){
$stream = new ReadableResourceStream($chunk, $loop);
})
->otherwise(function($reason){
if(!$fileStream){
return new Response(404, [
'Content-Type' => 'text/plain'
], "The video doesn't exist on the server.");
}
});
I also have tried passing the $fstream to the ReadableResourceStream and i couldn't been able to return the video stream.
Do you know what its the error?
Thanks in advance!
The text was updated successfully, but these errors were encountered: