Level 88
Instead of $request->file, you need to do $file = $request->file('file');
Documentation: https://laravel.com/docs/5.6/requests#retrieving-uploaded-files
public function file(Request $request){
$file = $request->file;
$filename = $file->getClientOriginalName();
$file->move(public_path().'/videos',$filename);
$ffprobe = \FFMpeg\FFProbe::create();;
$duration = $ffprobe
->streams('/videos/'.$filename)
->videos()
->first()
->get('duration');
dd($duration);
}
show error like that...
try {
$output = $this->ffprobe->command($commands);
} catch (ExecutionFailureException $e) {
throw new RuntimeException(sprintf('Unable to probe %s', $pathfile), $e->getCode(), $e);
}
Please or to participate in this conversation.