Error 500 Internal Server Error

GET https://storm-preprod.ewm.dev/media/16/download/3services.svg

Forwarded to ErrorController (d5be99)

Exceptions

The file "/home/clients/14b5397f746691c6b08ec948889ec1dd/var/www/storm-be-preprod/var/uploads/media/01/3services.svg" does not exist

Exception

Symfony\Component\HttpFoundation\File\Exception\ FileNotFoundException

  1.      * @throws FileNotFoundException If the given path is not a file
  2.      */
  3.     public function __construct(string $pathbool $checkPath true)
  4.     {
  5.         if ($checkPath && !is_file($path)) {
  6.             throw new FileNotFoundException($path);
  7.         }
  8.         parent::__construct($path);
  9.     }
  1.         if (!$file instanceof File) {
  2.             if ($file instanceof \SplFileInfo) {
  3.                 $file = new File($file->getPathname(), !$isTemporaryFile);
  4.             } else {
  5.                 $file = new File($file);
  6.             }
  7.         }
  8.         if (!$file->isReadable() && !$isTemporaryFile) {
  9.             throw new FileException('File must be readable.');
  1.      */
  2.     public function __construct(\SplFileInfo|string $fileint $status 200, array $headers = [], bool $public true, ?string $contentDisposition nullbool $autoEtag falsebool $autoLastModified true)
  3.     {
  4.         parent::__construct(null$status$headers);
  5.         $this->setFile($file$contentDisposition$autoEtag$autoLastModified);
  6.         if ($public) {
  7.             $this->setPublic();
  8.         }
  9.     }
  1.         $fileSize $fileVersion->getSize();
  2.         $storageOptions $fileVersion->getStorageOptions();
  3.         $mimeType $fileVersion->getMimeType();
  4.         $lastModified $fileVersion->getCreated(); // use created as file itself is not changed when entity is changed
  5.         $response = new BinaryFileResponse($storage->getPath($storageOptions));
  6.         // Prepare headers
  7.         $disposition $response->headers->makeDisposition(
  8.             $dispositionType,
  9.             $fileName,
  1.             $response = new RedirectResponse($this->storage->getPath($storageOptions), 302);
  2.             $response->setPrivate();
  3.             return $response;
  4.         } elseif (StorageInterface::TYPE_LOCAL === $storageType) {
  5.             return $this->createBinaryFileResponse($fileVersion$this->storage$locale$dispositionType);
  6.         }
  7.         throw new \RuntimeException(\sprintf('Storage type "%s" not supported.'$storageType));
  8.     }
  1.             if (!$noCount) {
  2.                 $this->mediaManager->increaseDownloadCounter($fileVersion->getId());
  3.             }
  4.             $response $this->getFileResponse($fileVersion$request->getLocale(), $dispositionType);
  5.             return $response;
  6.         } catch (MediaException $e) {
  7.             throw new NotFoundHttpException('File not found: ' $e->getCode() . ' ' $e->getMessage(), $e);
  8.         }
in vendor/symfony/http-kernel/HttpKernel.php -> downloadAction (line 183)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2.         $this->requestStack->push($request);
  3.         $response null;
  4.         try {
  5.             return $response $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in public/index.php (line 69)
  1. // When using the HttpCache, you need to call the method in your front controller
  2. // instead of relying on the configuration parameter
  3. // https://symfony.com/doc/6.4/reference/configuration/framework.html#http-method-override
  4. Request::enableHttpMethodParameterOverride();
  5. $request Request::createFromGlobals();
  6. $response $kernel->handle($request);
  7. $response->send();
  8. $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)