DragAndDrop
Purpose
The DragAndDrop ViewTemplate provides a drop zone for files. Users can either drag files into the component or select them manually, after which a configured Action is executed automatically.
Figure: DragAndDrop ViewTemplate used as a drop zone.
Behavior
The drop zone can display descriptive text and triggers its configured dropAction as soon as a file has been selected or dropped.
The main properties are:
descriptionField, which provides the text shown inside the drop areadropAction, which defines the Action executed after the file input
Configuration
In the example, descriptionField references the field INFO of UniversalFileProcessor_entity from module mail-processing. The dropAction property references the Action that processes the uploaded file.
Ensure that the configured Action validates and processes the dropped file as required by the use case.
Example usage
An example is the ViewTemplate Dropzone in UniversalFileProcessorDropzone_view within Context UniversalFileProcessor.
In the client, this ViewTemplate is used, for example, in the Dashlet for importing emails.