‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent Class Reference

Public Member Functions

 __construct (private string $fileName, private readonly string $sourceFilePath, private readonly Folder $targetFolder, private readonly ResourceStorage $storage, private readonly DriverInterface $driver)
 getFileName ()
 setFileName (string $fileName)
 getSourceFilePath ()
 getTargetFolder ()
 getStorage ()
 getDriver ()

Detailed Description

This event is fired before a file is about to be added to the Resource Storage / Driver.

This allows to do custom checks to a file or restrict access to a file before the file is added.

Definition at line 29 of file BeforeFileAddedEvent.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent::__construct ( private string  $fileName,
private readonly string  $sourceFilePath,
private readonly Folder  $targetFolder,
private readonly ResourceStorage  $storage,
private readonly DriverInterface  $driver 

Definition at line 31 of file BeforeFileAddedEvent.php.

Member Function Documentation

◆ getDriver()

TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent::getDriver ( )

Definition at line 64 of file BeforeFileAddedEvent.php.

◆ getFileName()

TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent::getFileName ( )

◆ getSourceFilePath()

TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent::getSourceFilePath ( )

◆ getStorage()

TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent::getStorage ( )

Definition at line 59 of file BeforeFileAddedEvent.php.

◆ getTargetFolder()

TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent::getTargetFolder ( )

◆ setFileName()

TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent::setFileName ( string  $fileName)

Definition at line 44 of file BeforeFileAddedEvent.php.