Hi Patrick,
Thanks for the response.
I'm working on a project that uses browser based infopath 2010 forms with dot net code behind to interact with SAP web services. As such the form data is submitted to SAP rather than saved in a form library, so there is no XML instance. One of the capabilities needed on the form is to allow the initator to add files to be uploaded to a Sharepoint 2010 Document library (in a specific folder). I was able to do this using the openfile common dialog box like you can do in an ASPX form, but I've discovered that this is not compatible with Infopath browser based forms. I'm pretty sure that the fileupload ASPX control wouldn't be compatible either.
I'm pretty close to success after some work late yesterday afternoon. I used the file attachment control in a repeating table, but then on the submit button I loop thru the nodes and extract the filename and the bytes, then added a reference to and use the sharepoint object model to do the upload. I have a little work left to do to smooth it out, but this will probably be my best shot at achieving my goal.
However, if there is a way to add the fileUpload aspx control to the infopath form and it be web form compatible, I would prefer this since it would not limit the file size to 4m.