I have a browser enabled Infopath form and in that there is an option to upload attachments. I want to restrict the attachments to be
jpg/ jpeg only.
Is it possible to resolve this?
Any help is appreciated.
According to the official documentation by Microsoft for attachment control in InfoPath:
If you are designing a browser-compatible form template, you won't be able to specify which file types are allowed in the file attachment control.
By default, users can attach any type of file to the form, except files such as
.exefiles, which InfoPath blocks for security reasons. To limit the types of files that users can attach to their forms, do the following:
- Double-click the file attachment control.
- Click the Data tab.
- Under Binding, click Specify default file, and then click Browse.
- In the Attach File dialog box, select the file that you want to appear inside the file attachment box on the form template, and then click Insert.
You can read more about how to add file attachment in InfoPath form using above link.
Also, you can read more about it in answer given on MSDN forum at InfoPath - Attachment File Type Validation which says,
As you had known, if you are designing a browser-compatible form template, you won't be able to specify which file types are allowed in the file attachment control.
In other words, if you create an InfoPath form using "Blank Form (InfoPath Filler) template", you will have that checkbox.