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) ); } protected function buildParametersFromRequest(ServerRequestInterface $request): array
{ $targetIdentifier = $request->getAttribute('target'); $target = $this->getCallableFromTarget($targetIdentifier); $arguments = [$request]; return call_user_func_array($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); } }; } }
*/ 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); } }; } }
$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
* @return ResponseInterface */ protected function handle(ServerRequestInterface $request): ResponseInterface { return $this->requestHandler->handle($request); } /** * Set up the application and shut it down afterwards
// 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); } /** * Check if LocalConfiguration.php and PackageStates.php exist
final public function run(callable $execute = null) { try { $response = $this->handle( ServerRequestFactory::fromGlobals() ); if ($execute !== null) { call_user_func($execute); }
// Set up the application for the frontend call_user_func(function () { $classLoader = require __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(function () { $classLoader = require __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(); });