File upload lets a visitor upload a file by clicking a button and selecting it from a file browser.
You can restrict the size and types of files that the visitor is able to upload.
- Content tab
- Label text. Enter the text you want displayed on the form.
- Tooltip. Enter the text to display when you hover over the upload field.
- Max file size (in MB). Select the maximum file size (in MB).
- Allowed extensions. Specify a comma-separated list of file extensions that you permit to be uploaded.
To define a list of disallowed extensions, edit the defaultUploadExtensionBlackList in _protected/EPiServer.Forms/Forms.config.
- Validators. Enable Required to make sure a site visitor makes a choice before the visitor can submit the form. Disable it to make the choice optional.
- Category. Not used.
- Settings tab
Settings tab fields are not used for form elements.
The File upload element is used in the following examples: