Skip to content

Add getter setter for settings in upload service#1348

Closed
einpraegsam wants to merge 67 commits intomasterfrom
AddGetterSetterForSettingsInUploadService
Closed

Add getter setter for settings in upload service#1348
einpraegsam wants to merge 67 commits intomasterfrom
AddGetterSetterForSettingsInUploadService

Conversation

@einpraegsam
Copy link
Collaborator

This feature allows to change settings when using event UploadServicePreflightEvent.

In my case I want to change allowed file types for upload per Plugin.

Usage would be somehting like:

<?php

namespace In2code\In2template\Event\Listener;

use In2code\Powermail\Events\UploadServicePreflightEvent;

class AllowImageUploadEventListener
{
    private array $imageExtensions = [
        'gif',
        'jpeg',
        'jpg',
        'png',
        'svg',
        'webp',
    ];

    public function __invoke(UploadServicePreflightEvent $event): void
    {
        $settings = $event->getSettings();
        if ($this->isFormForStoringNews($settings)) {
            $settings['misc']['file']['extension'] = implode(',', $this->imageExtensions);
            $event->setSettings($settings);
        }
    }

    public function isFormForStoringNews(array $settings): bool
    {
        return ($settings['main']['saveasnews'] ?? '') === '1';
    }
}

mschwemer and others added 30 commits October 16, 2024 16:31
This is the last EXT:powermail release before starting the
work for TYPO3 v13 compatibility.
But don't fear: The TYPO3 v12 compatible version has
full support (bugfixes and features).
For details see https://github.com/in2code-de/powermail/blob/typo3-v12/Documentation/DevelopmentModel.md
Information about the EAP: https://www.in2code.de/en/agency/typo3-extensions/early-access-program/
To allow typo3's documentation tool to work with the documentation
in this repository some small configuration is needed.
Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>
- provide docs rendered on docs.typo3.org
- improve accessibility
After activating the feature, editors are now able to decide,
whether uploads should be sent to sender and / or receiver.
The html structure changed slightly due to the accessibility
improvements. These changes make tests green again.
The last release only contained the docs the new feature. php code
and templates were still missing
On access restricted pages an exception is thrown as  the user is null. (If logged in via backend)
As all filter requests are forwarded from the dispatch action to the
list action, the request is evaluated as "invalid" and submitted form
values are used by default. To ensure the current (new) field uids for
an export are taken into account, the corresponding attribute
"respectSubmittedDataValue" needs to be set.
Github is dropping support for old images. So we update to
the latest ubuntu lts images.
- raise version numbers
- suggest the direct use of `phpoffice/phpspreadsheet` via composer
- suggest `EXT:base_excel` for legacy installations
- test for class existence of PhpSpreadSheet

Related: #1214
Related: #1208
In event FormControllerFormActionEvent, make it possible to assign
variables to view.

Related: #1198
mschwemer and others added 28 commits July 22, 2025 08:54
It was possible to download an arbitrary file from a TYPO3
installation using the download link in the powermail module.
This commits adds a hmac to the link and validates it before
starting the download.
This release fixes an issue in the backend, where it was
possible to download files from the server, to which an editor
did not have propper access permissions.
The $mail argument needs to be optional so we can
act if the object is not given.

fixes #969
Add more methods to the event FormControllerFormActionEvent.
It is now possible to also retrieve the view and request from
this event. This makes it possible to - for example - add
variables to the view.
In case a file without extension is uploaded (e.g. a filename without a dot, like "pdf") an exception occurs, in all other cases a graceful false generates clear error messages. This simple fix should prevent the exception.
(and update phpstan baseline with reduced errors)

Related: #1247
The database field was 255 characters long, the flexform field
had "no" limitation. The length of both fields was adjusted.

Related: #1230
(cherry picked from commit 5e1209b)
…dSendEvent

It is possible to change the email and message in
SendMailServicePrepareAndSendEvent. The results were not passed back
to the SendMailService. This works now.

Related: #1236
(cherry picked from commit e9b9419)
Some small bugfixes and enhancements.

See release page on github for details:
https://github.com/in2code-de/powermail/releases/
Seems that the used action for ts linting is not available
anymore. So we switch to composer based linting.

(cherry picked from commit bf15344)
Flexform just needs the foreign_table configuration

Resolves: #1331
this feature allows to change settings when using event UploadServicePreflightEvent

Related: https://projekte.in2code.de/issues/77205
@einpraegsam einpraegsam deleted the AddGetterSetterForSettingsInUploadService branch February 19, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.