---
title: "PSR-14 events"
manual: "TYPO3 Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:fal-architecture-events@13.4"
source: "ApiOverview/Fal/Architecture/Events.rst"
rendered: "2026-09-18T05:52:58+00:00"
---

# PSR-14 events {#psr-14-events}

The file abstraction layer (FAL) comes with a series of
[PSR-14 events](https://docs.typo3.org/permalink/t3coreapi:eventdispatcher@13.4) that offer the opportunity to
hook into FAL processes at a variety of points.

They are listed below with some explanation, in particular when
they are sent (if the name is not explicit enough) and what
parameters the corresponding event will receive. They are grouped
by emitting class.

Most events exist in pairs, one being sent **before** a given
operation, the other one **after**.

> [!NOTE]
> Unless communicated otherwise, mentions of the `File` class below
> actually refer to the `\TYPO3\CMS\Core\Resource\FileInterface` interface.
>
> `Folder` objects actually refer to the
> `\TYPO3\CMS\Core\Resource\Folder` class.

****Table of contents:****

-   [\TYPO3\CMS\Core\Resource\DefaultUploadFolderResolver](https://docs.typo3.org/permalink/t3coreapi:php-typo3-cms-core-resource-defaultuploadfolderresolver@13.4)
-   [\TYPO3\CMS\Core\Resource\OnlineMedia\Processing\PreviewProcessing](https://docs.typo3.org/permalink/t3coreapi:php-typo3-cms-core-resource-onlinemedia-processing-previewprocessing@13.4)
-   [\TYPO3\CMS\Core\Resource\ResourceStorage](https://docs.typo3.org/permalink/t3coreapi:php-typo3-cms-core-resource-resourcestorage@13.4)
-   [\TYPO3\CMS\Core\Resource\StorageRepository](https://docs.typo3.org/permalink/t3coreapi:php-typo3-cms-core-resource-storagerepository@13.4)
-   [\TYPO3\CMS\Core\Resource\Index\FileIndexRepository](https://docs.typo3.org/permalink/t3coreapi:php-typo3-cms-core-resource-index-fileindexrepository@13.4)
-   [\TYPO3\CMS\Core\Resource\Index\MetaDataRepository](https://docs.typo3.org/permalink/t3coreapi:php-typo3-cms-core-resource-index-metadatarepository@13.4)
-   [\TYPO3\CMS\Core\Resource\Service\FileProcessingService](https://docs.typo3.org/permalink/t3coreapi:php-typo3-cms-core-resource-service-fileprocessingservice@13.4)
-   [\TYPO3\CMS\Core\Utility\File\ExtendedFileUtility](https://docs.typo3.org/permalink/t3coreapi:php-typo3-cms-core-utility-file-extendedfileutility@13.4)

## `\TYPO3\CMS\Core\Resource\DefaultUploadFolderResolver` {#php-typo3-cms-core-resource-defaultuploadfolderresolver}

-   **[AfterDefaultUploadFolderWasResolvedEvent](https://docs.typo3.org/permalink/t3coreapi:afterdefaultuploadfolderwasresolvedevent@13.4)**

    <!-- TODO: no Markdown rendering for "versionadded" -->

    Allows to modify the default upload folder after it has been resolved for
    the current page or user.

## `\TYPO3\CMS\Core\Resource\OnlineMedia\Processing\PreviewProcessing` {#php-typo3-cms-core-resource-onlinemedia-processing-previewprocessing}

-   **[AfterVideoPreviewFetchedEvent](https://docs.typo3.org/permalink/t3coreapi:aftervideopreviewfetchedevent@13.4)**

    <!-- TODO: no Markdown rendering for "versionadded" -->

    Modifies the preview file of online media previews (like YouTube and Vimeo).

## `\TYPO3\CMS\Core\Resource\ResourceStorage` {#php-typo3-cms-core-resource-resourcestorage}

-   **[SanitizeFileNameEvent](https://docs.typo3.org/permalink/t3coreapi:sanitizefilenameevent@13.4)**

    The sanitize file name operation aims to remove characters from
    filenames which are not allowed by the underlying
    [driver](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-components-drivers@13.4). The event receives the
    filename and the target folder.

-   **[BeforeFileAddedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefileaddedevent@13.4)**

    Receives the target file name, the target folder (as a `Folder`
    instance) and the local file path.

-   **[AfterFileAddedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfileaddedevent@13.4)**

    Receives the `File` instance corresponding to the
    newly stored file and the target folder (as a `Folder` instance).

-   **[BeforeFileCreatedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefilecreatedevent@13.4)**

    Receives the file name to be created and
    the target folder (as a `Folder` instance).

-   **[AfterFileCreatedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilecreatedevent@13.4)**

    Receives the name of the newly created file and
    the target folder (as a `Folder` instance).

-   **[BeforeFileCopiedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefilecopiedevent@13.4)**

    Receives a `File` instance for the file to be copied and
    the target folder (as a `Folder` instance).

-   **[AfterFileCopiedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilecopiedevent@13.4)**

    Receives a `File` instance for the file that was copied
    (i.e. the original file) and the target folder
    (as a `Folder` instance).

-   **[BeforeFileMovedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefilemovedevent@13.4)**

    Receives a `File` instance for the file to be moved and
    the target folder (as a `Folder` instance).

-   **[AfterFileMovedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilemovedevent@13.4)**

    Receives a `File` instance for the file that was moved,
    the target folder and the original folder the file was in
    (both as `Folder` instances).

-   **[BeforeFileDeletedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefiledeletedevent@13.4)**

    Receives a `File` instance for the file to be deleted.

-   **[AfterFileDeletedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfiledeletedevent@13.4)**

    Receives a `File` instance for the file that was deleted.

-   **[BeforeFileRenamedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefilerenamedevent@13.4)**

    Receives a `File` instance for the file to be renamed
    and the sanitized new name.

-   **[AfterFileRenamedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilerenamedevent@13.4)**

    Receives a `File` instance for the file that was renamed
    and the sanitized new name.

-   **[BeforeFileReplacedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefilereplacedevent@13.4)**

    Receives a `File` instance for the file to be replaced
    and the path to the local file that will replace it.

-   **[AfterFileReplacedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilereplacedevent@13.4)**

    Receives a `File` instance for the file that was replaced
    and the path to the local file that has replaced it.

-   **[BeforeFileContentsSetEvent](https://docs.typo3.org/permalink/t3coreapi:beforefilecontentssetevent@13.4)**

    Receives a `File` instance
    for the file whose content will be changed and the content itself
    (as a string).

-   **[AfterFileContentsSetEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilecontentssetevent@13.4)**

    Receives a `File` instance
    for the file whose content was changed and the content itself
    (as a string).

-   **[BeforeFolderAddedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefolderaddedevent@13.4)**

    Receives the name of the new folder and a reference to the
    parent folder, if any (as a `Folder` instance).

-   **[AfterFolderAddedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfolderaddedevent@13.4)**

    Receives the newly created folder (as a `Folder` instance).

-   **[BeforeFolderCopiedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefoldercopiedevent@13.4)**

    Receives references to the folder to copy and the parent target folder
    (both as `\TYPO3\CMS\Core\Resource\FolderInterface` instances)
    and the sanitized name for the copy.

-   **[AfterFolderCopiedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfoldercopiedevent@13.4)**

    Receives references to the original folder and the parent target folder
    (both as `\TYPO3\CMS\Core\Resource\FolderInterface` instances)
    and the identifier of the newly copied folder.

-   **[BeforeFolderMovedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefoldermovedevent@13.4)**

    Receives references to the folder to move and the parent target folder
    (both as `Folder` instances) and the sanitized target name.

-   **[AfterFolderMovedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfoldermovedevent@13.4)**

    Receives references to the folder to move and the parent target folder
    (both as `Folder` instances), the identifier of the moved folder
    and a reference to the original parent folder (as a `Folder` instance).

-   **[BeforeFolderDeletedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefolderdeletedevent@13.4)**

    Receives a reference to the folder to delete (as a `Folder` instance).

-   **[AfterFolderDeletedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfolderdeletedevent@13.4)**

    Receives a reference to the deleted folder (as a `Folder` instance).

-   **[BeforeFolderRenamedEvent](https://docs.typo3.org/permalink/t3coreapi:beforefolderrenamedevent@13.4)**

    Receives a reference to the folder to be renamed (as a `Folder`
    instance) and the sanitized new name.

-   **[AfterFolderRenamedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfolderrenamedevent@13.4)**

    Receives a reference to the renamed folder (as a `Folder` instance)
    and the new identifier of the renamed folder.

-   **[GeneratePublicUrlForResourceEvent](https://docs.typo3.org/permalink/t3coreapi:generatepublicurlforresourceevent@13.4)**

    This event makes it possible to influence the construction of the public URL
    of a resource. If the event defines the URL, it is kept as is and the rest
    of the URL generation process is ignored.

    It receives a reference to the instance for which the URL should be generated
    (as a `\TYPO3\CMS\Core\Resource\ResourceInterface` instance),
    a boolean flag indicating whether the URL should be relative to the current
    script or absolute and a reference to the public URL (which is null at
    this point, but can be then modified by the event).

## `\TYPO3\CMS\Core\Resource\StorageRepository` {#php-typo3-cms-core-resource-storagerepository}

-   **[BeforeResourceStorageInitializationEvent](https://docs.typo3.org/permalink/t3coreapi:beforeresourcestorageinitializationevent@13.4)**

    This event is dispatched by the method
    `\TYPO3\CMS\Core\Resource\StorageRepository::getStorageObject()`
    before a [storage](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-components-storage@13.4) object has
    been fetched. The event receives a reference to the storage.

-   **[AfterResourceStorageInitializationEvent](https://docs.typo3.org/permalink/t3coreapi:afterresourcestorageinitializationevent@13.4)**

    This event is dispatched by the method
    `\TYPO3\CMS\Core\Resource\StorageRepository::getStorageObject()`
    after a [storage](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-components-storage@13.4) object has
    been fetched. The event receives a reference to the storage.

## `\TYPO3\CMS\Core\Resource\Index\FileIndexRepository` {#php-typo3-cms-core-resource-index-fileindexrepository}

-   **[AfterFileAddedToIndexEvent](https://docs.typo3.org/permalink/t3coreapi:afterfileaddedtoindexevent@13.4)**

    Receives an array containing the information collected about the file
    whose index (i.e. [sys_file](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-database-sys-file@13.4) table
    entry) was just created.

-   **[AfterFileUpdatedInIndexEvent](https://docs.typo3.org/permalink/t3coreapi:afterfileupdatedinindexevent@13.4)**

    Receives an array containing the information collected about the file
    whose index (i.e. [sys_file](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-database-sys-file@13.4) table
    entry) was just updated.

-   **[AfterFileRemovedFromIndexEvent](https://docs.typo3.org/permalink/t3coreapi:afterfileremovedfromindexevent@13.4)**

    Receives the uid of the file (i.e.
    [sys_file](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-database-sys-file@13.4) table entry) which was
    deleted.

-   **[AfterFileMarkedAsMissingEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilemarkedasmissingevent@13.4)**

    Receives the uid of the file (i.e.
    [sys_file](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-database-sys-file@13.4) table entry) which was
    marked as missing.

## `\TYPO3\CMS\Core\Resource\Index\MetaDataRepository` {#php-typo3-cms-core-resource-index-metadatarepository}

-   **[EnrichFileMetaDataEvent](https://docs.typo3.org/permalink/t3coreapi:enrichfilemetadataevent@13.4)**

    This event is dispatched after metadata has been retrieved for a given
    file. The event receives the metadata as an `\ArrayObject` instance.

-   **[AfterFileMetaDataCreatedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilemetadatacreatedevent@13.4)**

    Receives an array containing the metadata collected about the file
    just after it has been inserted into the
    [sys_file_metadata](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-database-sys-file-metadata@13.4) table.

-   **[AfterFileMetaDataUpdatedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilemetadataupdatedevent@13.4)**

    This event is dispatched after metadata for a given file has been
    updated. The event receives the metadata as an array containing all
    metadata fields (and not just the updated ones).

-   **[AfterFileMetaDataDeletedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilemetadatadeletedevent@13.4)**

    Receives the uid of the file whose metadata has just been deleted.

## `\TYPO3\CMS\Core\Resource\Service\FileProcessingService` {#php-typo3-cms-core-resource-service-fileprocessingservice}

-   **[BeforeFileProcessingEvent](https://docs.typo3.org/permalink/t3coreapi:beforefileprocessingevent@13.4)**

    This event is dispatched before a file is processed. The event receives
    a reference to the processed file and to the original file (both as
    `File` instances), a string defining the type of task being
    executed and an array containing the configuration for that task.

-   **[AfterFileProcessingEvent](https://docs.typo3.org/permalink/t3coreapi:afterfileprocessingevent@13.4)**

    This event is dispatched after a file has been processed. The event receives
    a reference to the processed file and to the original file (both as
    `File` instances), a string defining the type of task being
    executed and an array containing the configuration for that task.

See the [section about services](https://docs.typo3.org/permalink/t3coreapi:fal-architecture-components-services@13.4)
for more information about this class.

## `\TYPO3\CMS\Core\Utility\File\ExtendedFileUtility` {#php-typo3-cms-core-utility-file-extendedfileutility}

[AfterFileCommandProcessedEvent](https://docs.typo3.org/permalink/t3coreapi:afterfilecommandprocessedevent@13.4)

> The event can be used to perform additional tasks for specific file
> commands. For example, trigger a custom indexer after a file has been
> uploaded.
