FileDumpController

readonly class \TYPO3\CMS\Core\Controller\FileDumpController

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Properties

$eventDispatcher  : EventDispatcherInterface
$resourceFactory  : ResourceFactory
$responseFactory  : ResponseFactoryInterface

Methods

__construct()  : mixed
dumpAction()  : ResponseInterface
Main method to dump a file
applyContentSecurityPolicy()  : ResponseInterface
Applies hard-coded content-security-policy (CSP) for file to be dumped.
buildParametersFromRequest()  : array
createFileObjectByParameters()  : File|FileReference|ProcessedFile|null
isFileValid()  : bool

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$responseFactory

protected ResponseFactoryInterface $responseFactory

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher, ResourceFactory $resourceFactory, ResponseFactoryInterface $responseFactory, FileDumpService $fileDumpService, FileNameValidator $fileNameValidator, ProcessedFileRepository $processedFileRepository) : mixed

Parameters

$eventDispatcher : EventDispatcherInterface
$resourceFactory : ResourceFactory
$responseFactory : ResponseFactoryInterface
$fileDumpService : FileDumpService
$fileNameValidator : FileNameValidator
$processedFileRepository : ProcessedFileRepository

dumpAction()

Main method to dump a file

public dumpAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Tags

throws
InvalidArgumentException
throws
RuntimeException
throws
UnexpectedValueException

Return values

ResponseInterface

applyContentSecurityPolicy()

Applies hard-coded content-security-policy (CSP) for file to be dumped.

protected applyContentSecurityPolicy(ResourceInterface $file, ResponseInterface $response) : ResponseInterface

Parameters

$file : ResourceInterface
$response : ResponseInterface

Return values

ResponseInterface

buildParametersFromRequest()

protected buildParametersFromRequest(ServerRequestInterface $request) : array

Parameters

$request : ServerRequestInterface

Return values

array
On this page