ErrorException {#82 #severity: E_WARNING }
return $this->error('Diese Datei existiert nicht.'); } $filePath = PUBLIC_PATH . '/' . $file->getURL(); $response = new StreamedResponse(fn() => readfile($filePath)); $fallbackFilename = Strings::slug($file->targetName); $response->headers->set('Content-Type', MimeTypes::guessMimeType($filePath)); $response->headers->set( if (!isset($this->callback)) { throw new \LogicException('The Response callback must be set.'); } ($this->callback)(); return $this; } /** * @return $this */ public function send(bool $flush = true): static { $this->sendHeaders(); $this->sendContent(); if (!$flush) { return $this; }// Set up system
$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
|
ErrorException
|
|---|
ErrorException:
Warning: readfile(/www/htdocs/w01ca228/staging-hepa-gastro/public/usr/file/L434h3LgSAwJY4Zt.pdf): Failed to open stream: No such file or directory
at /www/htdocs/w01ca228/staging-hepa-gastro/src/Component/FileManager/Controller/DownloadController.php:137
at ch42\Component\FileManager\Controller\DownloadController->{closure:ch42\Component\FileManager\Controller\DownloadController::getFile():137}()
(/www/htdocs/w01ca228/staging-hepa-gastro/vendor/symfony/http-foundation/StreamedResponse.php:106)
at Symfony\Component\HttpFoundation\StreamedResponse->sendContent()
(/www/htdocs/w01ca228/staging-hepa-gastro/vendor/symfony/http-foundation/Response.php:398)
at Symfony\Component\HttpFoundation\Response->send()
(/www/htdocs/w01ca228/staging-hepa-gastro/public/index.php:32)
|