Actions
Feature #103594
openAllow specific file extensions per File Storage
Status:
New
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2024-04-10
Due date:
% Done:
0%
Estimated time:
PHP Version:
8.1
Tags:
FAL, Block File Extension
Complexity:
easy
Sprint Focus:
Description
Let's image we have two File Storages set up:
- Documents (/fileadmin/documents/*)
- Images (/fileadmin/images/*)
- Documents (.pdf, .doc, .docx, .etc...)
- Images (.jpg, .jpeg, .png, .gif, .webp, .etc...)
I've created a simple BeforeFileAddedEvent listener (which I'm attaching here as an example). Below is a sample PageTS Config on the Page ID 1 Resources tab or on the user or user group Options tab:
permissions.file.storage { // 1 = Images Storage ID 1 { allowedExtensions = jpg|jpeg|png|webp|gif|svg allowedExtensionsMsg = To upload a document, please use the Documents drive. } // 5 = Documents Storage ID 5 { allowedExtensions = pdf|docx|doc|csv|xlsx|xls|pptx|ppt allowedExtensionsMsg = To upload an image, please use the Images drive. } }
Is it doable to include something similar in the core of TYPO3?
Thanks!
Files
Actions