Exceptions
Exception
Symfony\Component\HttpFoundation\File\Exception\ FileNotFoundException
in
vendor/symfony/http-foundation/File/File.php
(line 36)
* @throws FileNotFoundException If the given path is not a file*/public function __construct(string $path, bool $checkPath = true){if ($checkPath && !is_file($path)) {throw new FileNotFoundException($path);}parent::__construct($path);}
in
vendor/symfony/http-foundation/BinaryFileResponse.php
->
__construct
(line 73)
if (!$file instanceof File) {if ($file instanceof \SplFileInfo) {$file = new File($file->getPathname(), !$isTemporaryFile);} else {$file = new File($file);}}if (!$file->isReadable() && !$isTemporaryFile) {throw new FileException('File must be readable.');
in
vendor/symfony/http-foundation/BinaryFileResponse.php
->
setFile
(line 50)
*/public function __construct(\SplFileInfo|string $file, int $status = 200, array $headers = [], bool $public = true, ?string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true){parent::__construct(null, $status, $headers);$this->setFile($file, $contentDisposition, $autoEtag, $autoLastModified);if ($public) {$this->setPublic();}}
in
vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php
->
__construct
(line 173)
$fileSize = $fileVersion->getSize();$storageOptions = $fileVersion->getStorageOptions();$mimeType = $fileVersion->getMimeType();$lastModified = $fileVersion->getCreated(); // use created as file itself is not changed when entity is changed$response = new BinaryFileResponse($storage->getPath($storageOptions));// Prepare headers$disposition = $response->headers->makeDisposition($dispositionType,$fileName,
in
vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php
->
createBinaryFileResponse
(line 155)
$response = new RedirectResponse($this->storage->getPath($storageOptions), 302);$response->setPrivate();return $response;} elseif (StorageInterface::TYPE_LOCAL === $storageType) {return $this->createBinaryFileResponse($fileVersion, $this->storage, $locale, $dispositionType);}throw new \RuntimeException(\sprintf('Storage type "%s" not supported.', $storageType));}
in
vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php
->
getFileResponse
(line 132)
if (!$noCount) {$this->mediaManager->increaseDownloadCounter($fileVersion->getId());}$response = $this->getFileResponse($fileVersion, $request->getLocale(), $dispositionType);return $response;} catch (MediaException $e) {throw new NotFoundHttpException('File not found: ' . $e->getCode() . ' ' . $e->getMessage(), $e);}
in
vendor/symfony/http-kernel/HttpKernel.php
->
downloadAction
(line 183)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 182)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
// When using the HttpCache, you need to call the method in your front controller// instead of relying on the configuration parameter// https://symfony.com/doc/6.4/reference/configuration/framework.html#http-method-overrideRequest::enableHttpMethodParameterOverride();$request = Request::createFromGlobals();$response = $kernel->handle($request);$response->send();$kernel->terminate($request, $response);
Logs
No log messages
Stack Trace
|
FileNotFoundException
|
|---|
Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException:
The file "/home/clients/14b5397f746691c6b08ec948889ec1dd/var/www/storm-be-preprod/var/uploads/media/01/3services.svg" does not exist
at vendor/symfony/http-foundation/File/File.php:36
at Symfony\Component\HttpFoundation\File\File->__construct('/home/clients/14b5397f746691c6b08ec948889ec1dd/var/www/storm-be-preprod/var/uploads/media/01/3services.svg')
(vendor/symfony/http-foundation/BinaryFileResponse.php:73)
at Symfony\Component\HttpFoundation\BinaryFileResponse->setFile('/home/clients/14b5397f746691c6b08ec948889ec1dd/var/www/storm-be-preprod/var/uploads/media/01/3services.svg', null, false, true)
(vendor/symfony/http-foundation/BinaryFileResponse.php:50)
at Symfony\Component\HttpFoundation\BinaryFileResponse->__construct('/home/clients/14b5397f746691c6b08ec948889ec1dd/var/www/storm-be-preprod/var/uploads/media/01/3services.svg')
(vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php:173)
at Sulu\Bundle\MediaBundle\Controller\MediaStreamController->createBinaryFileResponse(object(FileVersion), object(LocalStorage), 'fr', 'attachment')
(vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php:155)
at Sulu\Bundle\MediaBundle\Controller\MediaStreamController->getFileResponse(object(FileVersion), 'fr', 'attachment')
(vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php:132)
at Sulu\Bundle\MediaBundle\Controller\MediaStreamController->downloadAction(object(Request), '16', '3services.svg')
(vendor/symfony/http-kernel/HttpKernel.php:183)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:182)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:69)
|