I'm not sure how that impacts your design, but there's an Embedded Element - File Upload control you can create in a form. It basically receives a file and attaches the file to a document.
If this HTML is on a form, maybe ... drop the pass-thru HTML, embed the file upload control, then re-enable for later HTML.
If it's on an XPage I think there's something for XPage too. Unfortunately I'm away from Designer right now.
I believe it uses HTTP protocol for the attachment, which by default is limited to something like 10 MB on the server. So if you want to go over 10 MB ... you'll need to increase that limit, too.