getQueryParams()['id'] ?? 0); try { $processedFile = $this->imageProcessingService->process($processedFileId); if (!$processedFile->getOriginalFile()->checkActionPermission('read')) { return new HtmlResponse('', 403); } return new RedirectResponse( GeneralUtility::locationHeaderUrl($processedFile->getPublicUrl() ?? '', $request) ); } catch (\Throwable $e) { // Fatal error occurred, which will be responded as 404 $this->logger->error('Processing of file with id {processed_file} failed', ['processed_file' => $processedFileId, 'exception' => $e]); } return new HtmlResponse('', 404); } }