Skip to content

Commit c44c179

Browse files
committed
Merge branch '5.4'
2 parents 176a025 + 894b080 commit c44c179

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Classes/Finishers/EmailFinisher.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Neos\FluidAdaptor\View\StandaloneView;
1919
use Neos\Form\Core\Model\AbstractFinisher;
2020
use Neos\Form\Exception\FinisherException;
21+
use Neos\Media\Domain\Model\ResourceBasedInterface;
2122
use Neos\SymfonyMailer\Service\MailerService;
2223
use Neos\Utility\Arrays;
2324
use Neos\Utility\ObjectAccess;
@@ -273,6 +274,9 @@ protected function addAttachments(Email $mail)
273274
$formValues = $this->finisherContext->getFormValues();
274275
if ($this->parseOption('attachAllPersistentResources')) {
275276
foreach ($formValues as $formValue) {
277+
if ($formValue instanceof ResourceBasedInterface) {
278+
$formValue = $formValue->getResource();
279+
}
276280
if ($formValue instanceof PersistentResource) {
277281
$mail->addPart(new DataPart($formValue->getStream(), $formValue->getFilename(), $formValue->getMediaType()));
278282
}

0 commit comments

Comments
 (0)