I have a form that I submit to a database using XDP through a HTTPS XML post. I can post the forms fields to the database with no problems.
However, I want to upload an attachment along with the XML post; the database does accept attachments as a base64.
I have a textfield on the form to which I convert the PDF document to a base64 sting using the following code (which I found elsewhere on this forum):
TextField1.rawValue
= SOAP.stringFromStream(SOAP.streamEncode(Collab.documentToStream(event.target), "base64"));
The question I have is how to change the XML tag in the LiveCycle form to include the file name attribute required by the database. They want the the tag to be formatted in the following manner:
<TextField1 filename=testfile.pdf>base64 encoded binary data</TextField1>
Ideally, I would like to make this file name dynamic based on another field in the form, but this is a secondary concern.
The attached file has a fake URL for the submit button and email address. Just need to get the filename= part working.