If you are asking your users to upload a file to your form, it is now possible to control what types of files can be accepted. For example, if you only wanted to accept image files for a particular upload field, you now have that option.
This can be helpful in preventing users from uploading the wrong types of files, thus saving you the trouble of having to ask your users to resubmit files they incorrectly uploaded.
Once you are inside the form builder, you will need to Add an Upload Field, click on Options and then select Validation Rules.
From here, there are three "quick" options for you to choose from: images, documents and archive files. These represent the most common types of files, however you can also define custom file extensions if needed.
Please note: The language of the File Upload text (not the label) is controlled by the language of the browser.
Images Quick Option
The Images Option covers the following image types:
Office Files Quick Option
The Documents Option covers the following file types:
Archive Files Quick Option
The Archive Files Option encompasses the following file types:
Applying Your Configuration
Once you have checked the file type(s) that you would like to allow for, all you need to do is save your form and the configuration will live.
Custom File Extensions
If you are expecting users to upload file types that are not included in the above options, you can click the Custom File Extension checkbox in order to allow for other options.
Once you check the Custom File Extension box, a blank text field will appear:
You can enter into the text field the extension of the file you are expecting. You do not need to include the period before the extension. You may enter multiple extensions by separating them with commas. When doing so, do not put in spaces.
Here is an example using common extensions:
Once you have entered in your custom values, press Enter and your changes will be saved.
When a respondent submits a response with a file upload, the FormAssembly server will check that the file's extension corresponds with the list of extensions you have specified. If there is a mismatch, the server will return an error to the user.
If the file extension is in the list of allowed extensions, the server will go on to check the internal type (known as the MIME type) of the file. This acts as in integrity check to ensure the internal type of the file corresponds to what the file extension says it is. If there is a mismatch between these two, the file is still let through, but the mismatch is logged by the server. If there is a match between the two, then the file is fine and is let through without incident.