File Upload
The File Upload element lets users attach one or more files to a form submission. Files can be uploaded immediately on selection or held until the form is submitted.
Properties
| Property | Type | Description |
|---|---|---|
label | string | Field label |
accept | string | Accepted file types as a MIME type pattern — see below |
multiple | boolean | Allow selecting more than one file at a time |
maxFiles | number | Maximum number of files the user may attach |
maxFileSize | number (bytes) | Per-file size limit |
maxTotalSize | number (bytes) | Combined size limit across all attached files |
uploadMode | immediate / deferred | immediate — files upload as soon as they are selected; deferred — files upload when the form is submitted |
Plus shared layout properties.
Accept patterns
The accept field follows the same syntax as the HTML accept attribute:
| Pattern | Accepts |
|---|---|
* | Any file type |
image/* | All image formats |
application/pdf | PDF files only |
image/*,application/pdf | Images and PDFs |
.docx,.xlsx | Specific file extensions |
WARNING
The platform enforces a 100 MB maximum upload size. maxTotalSize cannot exceed this value. See Conventions › Uploads.
See also: Elements overview
