The upload question type creates a file-select field with a 'Browse...' or 'Choose File' button for file uploads.
1. Upload a photo of your favorite shoes.
type: upload
Details
- To create an upload question, use the
type: upload
tag. - Upload questions accept only image file types by default. To allow other file types, use the
accept
tag. -
Multiple file types can be specified in a comma-separated list format by listing the media type followed by a forward slash (
/
), the extension type, a comma, and repeating the pattern. - You can use the wildcard syntax (
*
) to allow any extension or file type. - Uploaded files are stored in the survey's Upload folder within the Files applet.
Tip! Find a list of common media types here and discover the complete list of media types and subtypes here.
Additional examples
Uploading a non-image file
In the example below, respondents can upload any music file as the '*' specifies that all audio file types are permitted.
FILE. Upload your music file:
type: upload
accept: audio/*
Specifying multiple file types
If multiple specific file types are required, list them as a comma-separated list using the accept
tag. Re-visiting the first example, we again ask for an image file of the respondent's favorite shoes, this time allowing only PNG or JPEG files.
1. Upload a photo of your favorite shoes.
type: upload
accept: image/png,image/jpeg
Comments
0 comments
Please sign in to leave a comment.