Skip to content

Attachment Viewer

Properties

Visual

PropertyTypeDescription
Show File NameswitchDisplay the file name below the attachment preview
File Name FieldtextField name in the response that contains the file name
Auto ExpandswitchAutomatically expand the component to fill available space
Enable Image Preview DialogswitchAllow clicking on the image to open a large preview dialog
Object fitsingle selectSelect option for image object fit Allowed values: Contain, Cover, Fill, None, and 2 more.
WidthtextText value for width
HeighttextText value for height
Disable scrollbarbooleanEnable or disable disable scrollbar
Auto widthbooleanEnable or disable width auto
Auto heightbooleanEnable or disable height auto
Show Preview Buttonconditional booleanConfigure show preview button
Show Download Buttonconditional booleanConfigure show download button
Show Upload Buttonconditional booleanConfigure show upload button
Show Delete Buttonconditional booleanConfigure show delete button

Event_actions

PropertyTypeDescription
EventseventsConfigure event handlers

Datasource

PropertyTypeDescription
1. List Attachments (GET)datasourceData source used to fetch the list of all attachments
List HTTP Request Parametershttp request parameters configurationConfigure HTTP request parameters for the list attachments endpoint
2. Fetch Single Attachment (GET)datasourceData source used to fetch a single attachment content for preview
Get Single HTTP Request Parametershttp request parameters configurationConfigure HTTP request parameters for the get single attachment endpoint
3. Upload Attachment (POST)datasourceData source used to upload a new attachment file
Upload HTTP Request Parametershttp request parameters configurationConfigure HTTP request parameters for the upload attachment endpoint
4. Delete Attachment (DELETE)datasourceData source used to delete an attachment by its ID
Delete HTTP Request Parametershttp request parameters configurationConfigure HTTP request parameters for the delete attachment endpoint
File ID FieldtextField name in the response that contains the file identifier

Behavior

PropertyTypeDescription
Allowed File TypestextComma-separated list of accepted file types (e.g. image/*, .png, .jpg)

Events

EventDescription
On File(s) uploadEvent: ON_FILE_UPLOAD
On value changeTriggered when a value changes
On navigate nextEvent: ON_NAVIGATE_NEXT
On navigate previousEvent: ON_NAVIGATE_PREVIOUS
On attachment uploadEvent: ON_ATTACHMENT_UPLOAD
On attachment deleteEvent: ON_ATTACHMENT_DELETE
On attachment list fetchedEvent: ON_ATTACHMENT_LIST_FETCHED
On attachment fetchedEvent: ON_ATTACHMENT_FETCHED
On component initTriggered when the component initializes
On component destroyTriggered when the component is destroyed
On global parameters changeTriggered when global parameters change
On Data Hub ChangeTriggered when data hub changes

Additional Information

Category: Content

Current Version: 2