---
title: "Feature: #103594 - Allowed file extensions per storage and file mount"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-103594-1791966674"
source: "Changelog/15.0/Feature-103594-AllowedFileExtensionsPerStorageAndFileMount.rst"
typo3-version: "15.0"
typo3-major: 15
type: "feature"
issue: 103594
forge: "https://forge.typo3.org/issues/103594"
tags: ["Backend", "Database", "FAL", "TCA", "YAML", "ext:core"]
rendered: "2026-11-14T17:17:53+00:00"
---

# Feature: #103594 - Allowed file extensions per storage and file mount {#feature-103594-1791966674}

See [forge#103594](https://forge.typo3.org/issues/103594)

## Description {#description}

A file storage in `config/system/file-storages.yaml` has the new
option `allowedFileExtensions`, see [Breaking: #110762 - File storages are configured in a file instead of the database](https://docs.typo3.org/permalink/changelog:breaking-110762-1789862500)
for the file. It takes a list of file extensions, for example for a storage
meant for images:

**config/system/file-storages.yaml**

```yaml
storages:
  2:
    name: Images
    allowedFileExtensions: [jpg, jpeg, png, webp]
    configuration:
      basePath: images/
```

A comma-separated string such as `'pdf,docx,xlsx'` is accepted as
well. The case of letters is ignored.

When the list is filled, a file can only enter the storage with one of these
extensions. This is checked by
`\TYPO3\CMS\Core\Resource\ResourceStorage` for every operation that
puts a file into the storage or gives it a new extension:

-   uploading, adding and creating a file, including replacing a file by an
    upload
-   copying a file or a folder, which checks every visible file the folder
    contains
-   moving a file from another storage
-   renaming or moving a file to a different extension

A rejected operation throws an
`\TYPO3\CMS\Core\Resource\Exception\IllegalFileExtensionException`,
which the backend reports as a message.

Where files are added in the backend, the allowed file extensions of the
folder are shown, and an upload of another file is rejected right away.
Online media providers and new text files are only offered if their file
extension is allowed in the folder.

Files that already are in the storage are not affected as long as they keep
their extension. They can still be renamed, moved within the storage, deleted
and have their content replaced without an upload. Copying such a file
creates a new file and is rejected. Processed files, such as thumbnails, are
written to the processing folder directly and are not checked either.

The same applies to files that reach the storage without TYPO3, for example
by FTP, a deployment or another application writing to the same S3 bucket.
The restriction guards the operations of
`\TYPO3\CMS\Core\Resource\ResourceStorage` only, it is not a
filter. Such files are indexed by the file list and the scheduler task
**File Abstraction Layer: Update storage index** as before, are
listed, can be referenced and are managed like any other file already in
place. Whoever writes to the storage directly has to enforce the
restriction there.

The list narrows what is allowed, it never widens it.
`$GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern']` is evaluated first
and keeps its meaning, and so does the system-wide list of allowed file
extensions enabled by the feature toggle
`security.system.enforceAllowedFileExtensions`.

Only the file extension is compared. Whether the content of a file matches
its extension is checked by the existing consistency check of the File
Abstraction Layer, see [Important: #106240 - Enforce File Extension and MIME-Type Consistency in File Abstraction Layer](https://docs.typo3.org/permalink/changelog:important-106240-1747316969). It is enabled by
default through the feature toggle
`security.system.enforceFileExtensionMimeTypeConsistency` and applies
when a file is added, uploaded, renamed or replaced, for file extensions with
a known MIME type.

### File mounts {#file-mounts}

File mount records have the new field **Allowed file extensions**,
a comma-separated list. It restricts what backend users may put into the
folder of the mount, which is useful where one storage is split into folders
for different purposes, for example `/images/` and `/documents/`
in `fileadmin/`.

The same operations are checked as for storages. Moving a folder checks the
files it contains as well, ignoring hidden files. A file that does not match
the file mounts it is located in may still be renamed and moved to another
folder that does not allow it either, as long as it keeps its extension.

As permissions of file mounts add up, a file extension is allowed in a folder
if any writable file mount of the user that contains the folder allows it. A
file mount without restriction therefore lifts the restriction of a file mount
for one of its subfolders. If a user gets the same folder mounted several
times through different groups, the lists are combined.

File mounts only apply to backend users without admin rights. Administrators,
frontend uploads and command line or API usage are restricted by the option of
the storage only.

## Impact {#impact}

Integrators can restrict which kinds of files end up in which storage or file
mount without writing a custom event listener. The option and the field are
empty for existing storages and file mounts, so nothing changes until they are
filled.
