DeleteUploads finishers
The "DeleteUploads finisher" removes files that have been submitted. You can use this finisher after the email finisher if you do not want to keep the files in your TYPO3 installation.
Note
Finishers are only executed when a form is successfully submitted. If a user uploads
a file but does not finish filling out the form, the uploaded files will not
be deleted. Use the console command
vendor/ to remove these files, see
Cleaning up uploaded form files.
Table of contents
Important
Finishers are executed in the order defined in your form definition.
DeleteUploads finisher in the YAML form definition
Use this finisher after the email finisher if you do not want to keep the files in your TYPO3 installation.
Finishers are executed in the order they are listed in the form definition YAML file:
identifier: example-form
label: 'example'
type: Form
finishers:
-
identifier: EmailToSender
options:
subject: 'Your Message: {message}'
-
identifier: DeleteUploads
# Define the delete uploads finisher AFTER the email finisher
# ...
Using the DeleteUploads finisher in PHP code
Developers can use the finisher key Delete to create
deleteuploads finishers in their own classes:
<?php
use TYPO3\CMS\Form\Domain\Model\FormDefinition;
class SomeClass
{
private function addDeleteUploadsFinisherWithMessage(FormDefinition $formDefinition, string $message)
{
$formDefinition->createFinisher('DeleteUploads');
}
}
This finisher is implemented in
\TYPO3\.