If you need help solving this exception, you can have a look at the TYPO3 Documentation. There you can find solutions provided by the TYPO3 community. Once you have found a solution to the problem, help others by contributing to the documentation page.
Find a solution for this exception in the TYPO3 Documentation.
$absoluteFilePath = $this->getAbsolutePath($fileIdentifier); // don't use $this->fileExists() because we need the absolute path to the file anyways, so we can directly // use PHP's filesystem method. if (!file_exists($absoluteFilePath) || !is_file($absoluteFilePath)) { throw new \InvalidArgumentException('File ' . $fileIdentifier . ' does not exist.', 1314516809); } $dirPath = PathUtility::dirname($fileIdentifier); $dirPath = $this->canonicalizeAndCheckFolderIdentifier($dirPath);
* @return ResponseInterface */ public function streamFile(string $identifier, array $properties): ResponseInterface { $fileInfo = $this->getFileInfoByIdentifier($identifier, ['name', 'mimetype', 'mtime', 'size']); $downloadName = $properties['filename_overwrite'] ?? $fileInfo['name'] ?? ''; $mimeType = $properties['mimetype_overwrite'] ?? $fileInfo['mimetype'] ?? ''; $contentDisposition = ($properties['as_download'] ?? false) ? 'attachment' : 'inline';
'as_download' => $asDownload, 'filename_overwrite' => $alternativeFilename, 'mimetype_overwrite' => $overrideMimeType, ]; return $this->driver->streamFile($file->getIdentifier(), $properties); } /** * Wrap DriverInterface::dumpFileContents into a SelfEmittableStreamInterface
} return $this->applyContentSecurityPolicy( $file, $file->getStorage()->streamFile( $file, (bool)($parameters['dl'] ?? false), $parameters['fn'] ?? null )
{ $targetIdentifier = $request->getAttribute('target'); $target = $this->getCallableFromTarget($targetIdentifier); $arguments = [$request]; return $target(...$arguments); } /** * Creates a callable out of the given parameter, which can be a string, a callable / closure or an array
return (new Response())->withStatus(404, 'eID not registered'); } $request = $request->withAttribute('target', $target); return $this->dispatcher->dispatch($request) ?? new NullResponse(); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$request = $request->withAttribute('routing', $routeResult); if ($routeResult->getLanguage() instanceof SiteLanguage) { Locales::setSystemLocaleFromSiteLanguage($routeResult->getLanguage()); } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->language->getLanguageId() === 0 ? (int)$page['uid'] : (int)$page['l10n_parent'] ); if ($enhancerConfiguration === null) { return $handler->handle($request); } $this->configure($enhancerConfiguration);
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
*/ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request)); return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
1396795884 ); } return $handler->handle($request); } /** * Checks if the provided host header value matches the trusted hosts pattern.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$this->timeTracker->setEnabled($timeTrackingEnabled); $this->timeTracker->start(microtime(true)); $this->timeTracker->push(''); $response = $handler->handle($request); // Finish time tracking $this->timeTracker->pull(); $this->timeTracker->finish();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
*/ public function handle(ServerRequestInterface $request): ResponseInterface { try { $response = $this->requestHandler->handle($request); } catch (ImmediateResponseException $exception) { $response = $exception->getResponse(); } return $response;
// Create new request object having applicationType "I am a frontend request" attribute. $request = $request->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE); $this->initializeContext(); return parent::handle($request); } /** * Create a PSR-7 Response that redirects to the install tool
* @param callable $execute Deprecated, will be removed in TYPO3 v12.0 */ final public function run(callable $execute = null) { $response = $this->handle(ServerRequestFactory::fromGlobals()); if ($execute !== null) { trigger_error('Custom execution of Application code will be removed in TYPO3 v12.0, use PSR-15 Middlewares instead.', E_USER_DEPRECATED); $execute(); }
// Set up the application for the frontend call_user_func(static function () { $classLoader = require dirname(__DIR__).'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run(); });
call_user_func(static function () { $classLoader = require dirname(__DIR__).'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run(); });