Add Single File Upload
Audience:
Low-code EngineersSkill Prerequisites:
Forms,Tokens
Adds an upload field for one file to a Dynamic Field Container when the form loads. It works like a Single File Upload field placed in the form builder.
See Dynamic Fields for how dynamic fields work and how to set up the container.
Typical Use Cases
- Ask for a supporting document for each item in a list, for example a receipt for each expense line
- Add an upload field only when it's needed, for example a certificate for certain user types
Don't use it to
- Upload several files in one field. Use Add Multi File Upload instead.
Related Actions
| Action Name | Description |
|---|---|
| Add Multi File Upload | Adds an upload field for several files. |
| Copy File | Copies the uploaded file to another folder after submit. |
Input Parameter Reference
This action has the common parameters, except Secure Input and Readonly. It also has:
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Folder Input Mode | How the upload folder is given: Folder Path or Folder ID. | No | Folder Path | No |
| Upload to Folder | Folder Path mode. The folder to save the file in. Leave empty to use the Temp folder; files in Temp are deleted after the submit actions finish. | See note | none selected | Yes |
| Upload to Folder ID | Folder ID mode. The numeric ID of the folder to save the file in. | See note | empty string | Yes |
| Filename Pattern | The name to save the file under, for example [User:Username]-receipt. You can use [<FieldId>:FileName] and [<FieldId>:FileExtension] for the original name. Leave empty to keep the original name. | See note | empty string | No |
| File Types | The allowed file extensions, separated by commas, for example pdf,jpg,png. Leave empty to allow any extension the site allows. | See note | empty string | No |
| File Size Limit | The largest file allowed, in MB, for example 5 or 12.5. Leave empty for no limit. | See note | empty string | No |
| Show max size in error | When checked, the error for a file that's too large includes the size limit. | No | Unchecked | No |
| Handle Duplicates | What happens when a file with the same name already exists: Rename or Overwrite. | See note | Rename | No |
Tokens in the upload settings are replaced when the form is displayed and submitted, not when the action runs. Tokens that only exist while the action runs, such as the tokens of an Execute Actions for each List Entry loop, aren't available in these settings. Use them in Field Id and Field Title instead.
Output Parameters Reference
| Parameter | Description |
|---|---|
| Field ID Token Name | Optional. Token that receives the cleaned field ID. If empty, the ID is saved in [<FieldId>:Name]. |
When the form is submitted, the uploaded file is described by the same tokens as a Single File Upload field, for example [<FieldId>:FileId], [<FieldId>:RelativeUrl] and [<FieldId>:FilePath]. See Single File Upload for the full list.
Examples
To understand how to use the below examples, please see Running Examples.
1. Add a PDF upload
Add this action to the form's On PreInit or On Init actions. It adds a required upload field to the ExtraFields container that accepts PDF files up to 5 MB and saves them in the Documents folder.
{
"Title": "Add Single File Upload",
"ActionType": "AddSingleFileUpload",
"Description": "Add the certificate upload",
"Condition": null,
"Parameters": {
"ContainerId": "ExtraFields",
"FieldId": "Certificate",
"FieldName": "Certificate (PDF)",
"FolderInputMode": {
"Expression": "",
"Value": "FolderPath",
"IsExpression": false,
"Parameters": {}
},
"Folder": {
"Expression": "",
"Value": "/Documents",
"IsExpression": false,
"Parameters": {}
},
"Pattern": "",
"FileExt": "pdf",
"FileLimit": "5",
"MaxSizeInError": true,
"Duplicates": {
"Expression": "",
"Value": "Rename",
"IsExpression": false,
"Parameters": {}
},
"IsRequired": "true",
"FieldIdTokenName": ""
}
}
Revised 09/25/2026