Are you an LLM? You can read better optimized documentation at /help-and-resources/components/content/attachment-viewer.md for this page in Markdown format
Attachment Viewer
Properties
Visual
| Property | Type | Description |
|---|---|---|
| Show File Name | switch | Display the file name below the attachment preview |
| File Name Field | text | Field name in the response that contains the file name |
| Auto Expand | switch | Automatically expand the component to fill available space |
| Enable Image Preview Dialog | switch | Allow clicking on the image to open a large preview dialog |
| Object fit | single select | Select option for image object fit Allowed values: Contain, Cover, Fill, None, and 2 more. |
| Width | text | Text value for width |
| Height | text | Text value for height |
| Disable scrollbar | boolean | Enable or disable disable scrollbar |
| Auto width | boolean | Enable or disable width auto |
| Auto height | boolean | Enable or disable height auto |
| Show Preview Button | conditional boolean | Configure show preview button |
| Show Download Button | conditional boolean | Configure show download button |
| Show Upload Button | conditional boolean | Configure show upload button |
| Show Delete Button | conditional boolean | Configure show delete button |
Event_actions
| Property | Type | Description |
|---|---|---|
| Events | events | Configure event handlers |
Datasource
| Property | Type | Description |
|---|---|---|
| 1. List Attachments (GET) | datasource | Data source used to fetch the list of all attachments |
| List HTTP Request Parameters | http request parameters configuration | Configure HTTP request parameters for the list attachments endpoint |
| 2. Fetch Single Attachment (GET) | datasource | Data source used to fetch a single attachment content for preview |
| Get Single HTTP Request Parameters | http request parameters configuration | Configure HTTP request parameters for the get single attachment endpoint |
| 3. Upload Attachment (POST) | datasource | Data source used to upload a new attachment file |
| Upload HTTP Request Parameters | http request parameters configuration | Configure HTTP request parameters for the upload attachment endpoint |
| 4. Delete Attachment (DELETE) | datasource | Data source used to delete an attachment by its ID |
| Delete HTTP Request Parameters | http request parameters configuration | Configure HTTP request parameters for the delete attachment endpoint |
| File ID Field | text | Field name in the response that contains the file identifier |
Behavior
| Property | Type | Description |
|---|---|---|
| Allowed File Types | text | Comma-separated list of accepted file types (e.g. image/*, .png, .jpg) |
Events
| Event | Description |
|---|---|
On File(s) upload | Event: ON_FILE_UPLOAD |
On value change | Triggered when a value changes |
On navigate next | Event: ON_NAVIGATE_NEXT |
On navigate previous | Event: ON_NAVIGATE_PREVIOUS |
On attachment upload | Event: ON_ATTACHMENT_UPLOAD |
On attachment delete | Event: ON_ATTACHMENT_DELETE |
On attachment list fetched | Event: ON_ATTACHMENT_LIST_FETCHED |
On attachment fetched | Event: ON_ATTACHMENT_FETCHED |
On component init | Triggered when the component initializes |
On component destroy | Triggered when the component is destroyed |
On global parameters change | Triggered when global parameters change |
On Data Hub Change | Triggered when data hub changes |
Additional Information
Category: Content
Current Version: 2