Single File Upload
The Single File Upload field type in Plant an App provides a widget for users to upload single files with support for drag-and-drop functionality and a progress bar. This field type is ideal when you need users to upload only one file at a time within your forms.
Typical Use Cases
- Collecting user profile images or documents.
- Uploading a single attachment in contact forms.
- Handling file inputs in a controlled manner for processing in actions.
Specific Parameters
| Field | Description and information |
|---|---|
Filename Pattern | Define a pattern to use for filenames on the server. Use tokens like [User:Username]-avatar. If left blank, the original filename is used. Supports Tokens. |
File Types | Specify file extensions that are accepted for upload, e.g., txt,cs,doc. Supports Tokens. |
File Size Limit | Set a maximum file size in MB for uploads. Leave empty for no limit. |
Show max size in error | Display the maximum file size error message when attempts exceed the limit. |
Folder Input Mode | Choose to provide a folder path or ID for file uploads. Options are Folder Path or Folder ID. |
Upload to Folder | Define the folder for file uploads. Active when "Folder Input Mode" is set to "Folder Path." Supports Tokens. |
Upload to Folder ID | Define folder ID for uploads. Active when "Folder Input Mode" is set to "Folder ID." |
Handle Duplicates | Decide how to handle duplicate uploads: Rename or Overwrite. |
Initial Value | Pre-set a starting value that can be either a FileName or FileId. FilePath conflicts with 'Upload to Folder'. Supports Tokens. |
Save to Report | When checked, stores the field's value in the avtActionForm_Reports table. |
Useful Details
If the Upload to Folder parameter is provided, the file will be created and remain in that location.
If the Upload to Folder parameter is set to "--" (when in dropdown mode) or left blank (when in EXPR mode), the file is uploaded to a temporary location and deleted afterward. This is beneficial if your goal is to handle the file within the current action stack and trigger automatic removal afterward.