File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818use Neos \FluidAdaptor \View \StandaloneView ;
1919use Neos \Form \Core \Model \AbstractFinisher ;
2020use Neos \Form \Exception \FinisherException ;
21+ use Neos \Media \Domain \Model \ResourceBasedInterface ;
2122use Neos \SymfonyMailer \Service \MailerService ;
2223use Neos \Utility \Arrays ;
2324use 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 }
You can’t perform that action at this time.
0 commit comments