External Form :: File Upload :: Send as attachment


Can someone explain to me how I can add uploads that send as attachments to my external form?

I make the file upload area with:
<?php echo $form->file('prior_settlement_agreement');?>

But how to I store the post data in the controller, for example, I gather text data with:
$input['text_value'] = $text->sanitize($form->getRequestValue('text_value'));

What is the equivalent for attachment, something like the following but I dont know:
$attachment['uploaded_file'] = $text->sanitize($form->getRequestValue('uploaded_file'));

Then when I go to send the message, how do I attach the files to the body, such as when I add the text via:
$body .= 'Text: ' . $input['text_value'] . "\r\n";

How do I upload and send attachments via an external form? I know the build in form does this, but I have to use external for my application.

View Replies:
ob7dev replied on at Permalink Reply
I see the built in form block does not send as attachment, it uploads to the site and gives a link to it. That is fine for my external form to work this way as well. Anyone know how to do that?