Closed greatsami closed 3 years ago
Hi @greatsami , I don't use windows 10. could you post your error trace here?
@mostafaznv Thank you for reply
the trace of error:
Mostafaznv\Larupload\Storage\FFMpeg::getMeta
C:\xampp\htdocs\laravel\tests\upload1\vendor\mostafaznv\larupload\src\Storage\FFMpeg.php:115
if ($process->isSuccessful()) {
$output = json_decode($output);
if ($output !== null) {
$stream = $output->streams[0];
$meta['width'] = isset($stream->width) ? (int)$stream->width : null;
$meta['height'] = isset($stream->height) ? (int)$stream->height : null;
$meta['duration'] = (int)$stream->duration;
}
else {
$process->addErrorOutput('ffprobe output is null');
throw new Exception($process->getErrorOutput());
}
}
else {
**-> throw new Exception($process->getErrorOutput());**
}
$this->meta = $meta;
}
return $this->meta;
}
The second error coming from this class:
C:\xampp\htdocs\laravel\tests\upload1\vendor\mostafaznv\larupload\src\Storage\Attachment.php:585
$this->output['type'] = $this->getHumanReadableFileType($this->file->getMimeType());
$this->output['mime_type'] = $this->file->getMimeType();
}
/**
* Set media details
*
* @throws Exception
*/
protected function setMediaDetails(): void
{
switch ($this->type) {
case 'video':
case 'audio':
$ffmpeg = new FFMpeg($this->file);
**-> $meta = $ffmpeg->getMeta();**
$this->output['width'] = (int)$meta['width'];
$this->output['height'] = (int)$meta['height'];
$this->output['duration'] = (int)$meta['duration'];
...
Thank you
Put this code:
$path = str_replace('\\', '/', $path);
In line 92
of this class: C:\xampp\htdocs\laravel\tests\upload1\vendor\mostafaznv\larupload\src\Storage\FFMpeg.php
and check if getMeta() works or not.
I think this problem comes from backslash paths in windows.
And this is from log file:
[2021-02-05 18:08:34] local.ERROR: Error in GnuTLS initialization: Failed to acquire random data.
{"exception":"[object] (Exception(code: 0): Error in GnuTLS initialization: Failed to acquire random data.
at C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Storage\\FFMpeg.php:115)
[stacktrace]
#0 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Storage\\Attachment.php(585): Mostafaznv\\Larupload\\Storage\\FFMpeg->getMeta()
#1 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Storage\\Attachment.php(264): Mostafaznv\\Larupload\\Storage\\Attachment->setMediaDetails()
#2 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Traits\\Larupload.php(51): Mostafaznv\\Larupload\\Storage\\Attachment->saved(Object(App\\Models\\Upload))
#3 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Events\\Dispatcher.php(392): App\\Models\\Upload::Mostafaznv\\Larupload\\Traits\\{closure}(Object(App\\Models\\Upload))
#4 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Events\\Dispatcher.php(237): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('eloquent.saved:...', Array)
#5 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Concerns\\HasEvents.php(189): Illuminate\\Events\\Dispatcher->dispatch('eloquent.saved:...', Array)
#6 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(898): Illuminate\\Database\\Eloquent\\Model->fireModelEvent('saved', false)
#7 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(869): Illuminate\\Database\\Eloquent\\Model->finishSave(Array)
#8 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\app\\Http\\Controllers\\UploadController.php(29): Illuminate\\Database\\Eloquent\\Model->save()
#9 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Controller.php(54): App\\Http\\Controllers\\UploadController->store(Object(Illuminate\\Http\\Request))
#10 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('store', Array)
#11 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(254): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\UploadController), 'store')
#12 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(197): Illuminate\\Routing\\Route->runController()
#13 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(693): Illuminate\\Routing\\Route->run()
#14 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#15 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#16 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#17 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#18 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#19 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#20 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#21 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#22 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(63): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#23 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#24 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#25 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#27 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#29 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(695): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#30 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(670): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#31 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(636): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#32 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(625): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#33 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(166): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#34 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#35 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#36 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#37 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#38 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#39 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#40 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#41 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#42 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#43 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\fruitcake\\laravel-cors\\src\\HandleCors.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#44 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#45 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\fideloper\\proxy\\src\\TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#46 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#47 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#48 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(141): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#49 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#50 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\public\\index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#51 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\server.php(21): require_once('C:\\\\xampp\\\\htdocs...')
#52 {main}
"}
Thank you
After I added the mentioned code, I faced this error:
[2021-02-05 18:38:00] local.INFO: larupload queue finished. id: 1, model: App\Models\Upload, statusId: 1
[2021-02-05 18:38:00] local.ERROR: Error in GnuTLS initialization: Failed to acquire random data.
ffmpeg version 4.3.2-2021-02-02-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
C:^^^\xampp^^^\tmp^^^\php2CC8.tmp: No such file or directory
{"exception":"[object] (Exception(code: 0): Error in GnuTLS initialization: Failed to acquire random data.
ffmpeg version 4.3.2-2021-02-02-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
C:^^^\\xampp^^^\\tmp^^^\\php2CC8.tmp: No such file or directory
at C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Storage\\FFMpeg.php:332)
[stacktrace]
#0 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Storage\\FFMpeg.php(162): Mostafaznv\\Larupload\\Storage\\FFMpeg->run(Array, 'local', 'C:\\\\xampp\\\\htdocs...')
#1 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Storage\\Attachment.php(643): Mostafaznv\\Larupload\\Storage\\FFMpeg->capture('437.0', Array, 'local', 'C:\\\\xampp\\\\htdocs...')
#2 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Storage\\Attachment.php(268): Mostafaznv\\Larupload\\Storage\\Attachment->setCover(1)
#3 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\mostafaznv\\larupload\\src\\Traits\\Larupload.php(51): Mostafaznv\\Larupload\\Storage\\Attachment->saved(Object(App\\Models\\Upload))
#4 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Events\\Dispatcher.php(392): App\\Models\\Upload::Mostafaznv\\Larupload\\Traits\\{closure}(Object(App\\Models\\Upload))
#5 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Events\\Dispatcher.php(237): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('eloquent.saved:...', Array)
#6 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Concerns\\HasEvents.php(189): Illuminate\\Events\\Dispatcher->dispatch('eloquent.saved:...', Array)
#7 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(898): Illuminate\\Database\\Eloquent\\Model->fireModelEvent('saved', false)
#8 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(869): Illuminate\\Database\\Eloquent\\Model->finishSave(Array)
#9 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\app\\Http\\Controllers\\UploadController.php(29): Illuminate\\Database\\Eloquent\\Model->save()
#10 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Controller.php(54): App\\Http\\Controllers\\UploadController->store(Object(Illuminate\\Http\\Request))
#11 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('store', Array)
#12 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(254): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\UploadController), 'store')
#13 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(197): Illuminate\\Routing\\Route->runController()
#14 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(693): Illuminate\\Routing\\Route->run()
#15 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#16 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#17 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#18 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#19 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#20 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#21 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#22 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#23 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(63): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#24 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#25 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#26 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#27 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#28 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#29 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#30 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(695): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#31 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(670): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#32 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(636): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#33 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(625): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#34 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(166): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#35 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#36 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#37 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#38 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#39 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#40 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#41 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#42 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#43 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#44 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\fruitcake\\laravel-cors\\src\\HandleCors.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#45 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#46 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\fideloper\\proxy\\src\\TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#47 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#48 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#49 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(141): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#50 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#51 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\public\\index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#52 C:\\xampp\\htdocs\\laravel\\tests\\upload1\\server.php(21): require_once('C:\\\\xampp\\\\htdocs...')
#53 {main}
"}
C:^^^\xampp^^^\tmp^^^\php2CC8.tmp: No such file or directory
As I thought, it seems the problem is about escaping backslashes in uploaded file path.
could you change cmd
function in C:\xampp\htdocs\laravel\tests\upload1\vendor\mostafaznv\larupload\src\Storage\FFMpeg.php
with this function?
protected function cmd(string $cmd): array
{
$cmd = str_replace('\\', '/', $cmd);
return explode(' ', escapeshellcmd($cmd));
}
and in the second try, replace this code with cmd
function and tell me what happens after that.
protected function cmd(string $cmd): array
{
return explode(' ', escapeshellarg($cmd));
}
note: if you are using queue, restart your queue again after any changes.
bug fixed and released under 0.0.10 version
Hello,
I'm trying to upload video with this package.
but I faced problem
Error in GnuTLS initialization: Failed to acquire random data.
My Environment is: Windows 10 Laravel 8 I download ffmpeg from this link: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
and update config/larupload.php
What I can do?