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: uploadtag. - Upload questions accept only image file types by default. To allow other file types, use the
accepttag. -
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 automatically organized into a folder named after the question in the survey file manager. The uploaded file will include the respondent ID for easy identification.
Tip! Find a list of common media types here and discover the complete list of media types and subtypes here.
Additional examples
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
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/*
Comments
0 comments
Please sign in to leave a comment.