.. _attachableUploadElement: ================================ AttachableUploadElementInterface ================================ The ``EmailFinisher`` of this extension attaches uploaded files to the mail when the finisher option ``attachUploads`` is enabled. By default only the core ``FileUpload`` element is considered. A custom form element that stores uploaded files can opt in by implementing ``LIA\LiaForm\Domain\Model\FormElements\AttachableUploadElementInterface``. No finisher override and no service re-binding is needed. Contract ======== The element value returned by the ``FormRuntime`` must be ``null``, a ``TYPO3\CMS\Extbase\Domain\Model\FileReference``, a ``TYPO3\CMS\Core\Resource\FileInterface``, or an array or ``TYPO3\CMS\Extbase\Persistence\ObjectStorage`` of those. ``null`` entries are skipped. Any other value makes the finisher throw a ``FinisherException``, so a broken upload element fails loudly instead of sending a mail without its attachments. Example ======= .. code-block:: php :caption: EXT:my_extension/Classes/Domain/Model/FormElements/MyUploadElement.php