InfoPath forms have a default control for attaching/uploading files, called File Attachment. You can find it on the Design Tasks pane (View –> Design Tasks), under Controls within the File and Picture section. You can easily drag and drop the control unto your form in design mode.
InfoPath team blog has a post on this, which also explains the blocked file types (such as exe and bat).
Additional:
If you ever get a “File not found” error attaching or uploading files there is a wonderful post here by SaurabhKV. I resolved this issue by adding a tiny bit of JavaScript (see below) as per-SaurabhKV’s post into a hidden CEWP at the bottom of the page in where the form resides. Hope this helps.
<script type="text/javascript">
aspnetForm.encoding = "multipart/form-data";
</script>
Twitter
Linkedin
Live



1 comments:
Javascript snippet worked perfectly, thanks.
Post a Comment