Image Upload Field Type
Description
Allows the user to modify the user-supplied image files associated with the respective form. Functionally, the field imposes a file type restriction to support only image file formats over the File Upload Field Type Also, allows the user to preview the image when uploading.
Additional Properties
The field has the following additional properties that can be defined while creating it
- Whether user can upload a file: Toggle to allow or deny file upload
- Whether user can take a photo with the device camera: Opt-in camera/selfie capture. Defaults to disabled; configured
jpg,jpeg,png, orwebpoutput is required for normalized live capture. - Whether user can delete an existing file: Toggle to allow or deny deletion of an uploaded file
- Whether user can download an existing file: Toggle to allow or deny download of an uploaded file
- Semi colon separated list of supported data types: List allowed data types for upload separated by semicolon
- Whether to store this document as a separate attachment record or in a field within the target data store (native): Toggle to store natively within a field or as a separate record within the data store.
- Auto Upload: Toggle to allow or deny auto-upload of the file without explicitly clicking the upload button
- Show Preview for Content: Toggle to show a preview before or after upload
- Hide on Summary: Hide the field from the summary page
- Delete Value when Hidden: Delete the field value if the field is hidden
Events
An Image Upload field supports events at these points in its upload lifecycle:
| Event pipeline | When it runs | Typical uses |
|---|---|---|
| Before Document Upload | After a valid image is selected or captured and its content is available to the form, before the upload is completed | Inspect image content, call an image-analysis integration, populate metadata, check business requirements, or prepare related form values. |
| After Document Upload | After the image has uploaded successfully | Classify or tag the image, populate related fields, update a status, start downstream processing, or notify another system that the image is available. |
An After Document Upload pipeline completes before upload auto-save begins. Values produced by linked events can therefore be included in the saved form data. Image preview remains part of the field's normal selection and upload behavior.
Both pipelines can contain multiple linked events. Use their order when one action depends on another—for example, run an integration and then use Set Field Value to apply its result. General event behavior, including Set Field Value target scope, is described in Events on a Form.
When this field is in a repeating/grouping section, the row containing the selected or captured image supplies the event context. Events configured on the field apply to every generated row.
Pass image content to an Integration Workflow
Any form event that calls an Integration Workflow can map this field's File Content (Base64), File Name and Content Type to workflow inputs, including a button click and both upload pipelines. These values are available for the current image in Before Document Upload, before it has a saved document ID, as well as after a successful upload. If no local selection remains, the form retrieves the saved document before calling the workflow, including after a refresh. A new local selection takes precedence. Metadata is supplied where available.
See Pass Files to Integration Workflows for input settings, event mappings and workflow request mapping. Existing Doc Body (Data URL) mappings retain their behavior.
Validations
Uploaded image validation
The form checks the selected image's extension and size before uploading it. These browser checks mirror the form's published allowed image types and maximum file size; the server repeats the checks and remains the final authority. When no maximum is configured, the default is 5 MB. A valid image can be previewed before or after upload.
When camera capture is enabled, the theme-controlled Take selfie action opens a live
front-facing camera preview where supported. The user must explicitly choose Use photo
before the captured image enters the normal preview/upload pipeline; that action appears
only after capture succeeds. HTTPS and browser camera permission are required. The Choose
image fallback opens the browser or operating-system image picker. Supported mobile
browsers may offer a camera option; Windows and many desktop browsers normally open a file
chooser. The
default button uses the npo-selfie-button class and the
[[COREMETA_FIELDTAKESELFIEBUTTONLABEL]] label placeholder in the DEM Theme template.
The field supports the following validations to govern the values (files) permitted in the field.
- Required: Toggle to make the field mandatory or not.
- Conditional Validation: Specify custom conditions that should be satisfied on the field value with an accompanying error message to be displayed if the condition is not met.