File upload field
Use file_upload to collect one or more files from a respondent. Add it to a form’s field configuration and set the upload limits you need.
File upload fields also accept shared field properties.
Configuration
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
maxFileSize | number | no | The plan’s per-file limit: 20 MB on Free, 1 GB on Pro and Business | Largest size of one file, in MB. The range is 1–1000; a value above the plan limit is capped at that limit. |
allowedFileTypes | string[] | no | Every supported extension is accepted | Restricts uploads to extensions without a dot: pdf, doc, docx, xls, xlsx, csv, txt, rtf, ppt, pptx, png, jpg, jpeg, gif, webp, mp3, wav, ogg, m4a, mp4, webm, mov, avi, wmv, flv, mkv. |
maxFiles | integer | no | 1 | Number of files a respondent can upload, from 1 to 10. |
Validation
When the field is required, the respondent cannot continue without uploading a file. Files larger than the size limit, files with unsupported types or types excluded by allowedFileTypes, and files exceeding maxFiles are refused with a message. These size, type, and count limits are checked again at submission.
A hidden field skips validation, including the required check.
Submission value
The answer is a URL string when maxFiles is 1, a string array of URLs when maxFiles is greater than 1, or null when empty. Headless endpoints do not accept file uploads.
A Free form can have at most 3 upload fields; paid plans allow up to 100.
Example
{
"type": "file_upload",
"name": "resume",
"label": "Upload your resume",
"subtext": "PDF or Word, up to 5 MB.",
"maxFileSize": 5,
"allowedFileTypes": ["pdf", "doc", "docx"],
"maxFiles": 1,
"required": true
}