capture-file

Overview

circle-info

Platform compatibility

Compatible with all platforms. Web is only supported from version 4.80.0 of the JourneyApps Runtime.

circle-info

The capture-file component was visually updated in version 4.80.0 of JourneyApps Runtime.

The capture-file component allows users to upload a file from their device.

Basic Example

main.view.xml
<var name="current_file" type="attachment" media="application/pdf" />

<capture-file label="Upload signed document" bind="current_file" required="false" />

Standard Attributes

bind

bindchevron-right

label

labelchevron-right

required

requiredchevron-right

Advanced Attributes

align-content

align-contentchevron-right

align-controls

align-controlschevron-right

align-label

align-labelchevron-right

control-order

control-orderchevron-right

disabled

disabledchevron-right

downloadable

Optional

Type: boolean

Default: true

Set downloadable to false to hide the download button and prevent the user from downloading a captured/displayed file.

fullwidth

Optional

Type: boolean

Default: false

Specify whether the file preview should span the full width of the available screen space.

hide-filename

Optional

Type: boolean

Default: false

Override the default and hide the captured/displayed filename from the preview.

icon-position

circle-info

Version compatibility

icon-position was introduced in version 4.86.1 of the JourneyApps Runtime.

icon-positionchevron-right

id

idchevron-right

label-case

circle-info

Version compatibility

label-case was introduced in version 4.80.0 of the JourneyApps Runtime.

label-casechevron-right

label-color

label-colorchevron-right

on-change

on-changechevron-right

show-if and hide-if

show-ifchevron-righthide-ifchevron-right

Component Methods

The following component methods are available when an id is assigned to the component and component.captureFile({id:'my-id'}) / component.displayFile({id:'my-id'}) is called from JS/TS:

captureMedia

Programmatically open the file picker that enables the user to select and upload a file.

closeMedia

Programmatically close the file preview.

deleteMedia

Programmatically clear a captured file.

circle-exclamation

downloadMedia

Programmatically trigger a download of the captured/displayed file.

getMetadata

Retrieve metadata about the captured file.

openMedia

Programmatically open the file preview.

scrollIntoView

Programmatically scroll until the capture-file / display-file component is visible in the view.

Last updated