capture-file
Overview
Platform compatibility
Compatible with all platforms. Web is only supported from version 4.80.0 of the JourneyApps Runtime.
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
Standard Attributes
bind
bindbind
label
labellabel
required
requiredrequired
Advanced Attributes
align-content
align-contentalign-content
align-controls
align-controlsalign-controls
align-label
align-labelalign-label
control-order
control-ordercontrol-order
disabled
disableddisabled
downloadable
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
fullwidth
Optional
Type: boolean
Default: false
Specify whether the file preview should span the full width of the available screen space.
hide-filename
hide-filename
Optional
Type: boolean
Default: false
Override the default and hide the captured/displayed filename from the preview.
icon-position
icon-position
Version compatibility
icon-position
was introduced in version 4.86.1 of the JourneyApps Runtime.
id
idid
label-case
label-case
Version compatibility
label-case
was introduced in version 4.80.0 of the JourneyApps Runtime.
label-color
label-colorlabel-color
on-change
on-changeon-change
show-if
and hide-if
show-ifhide-ifshow-if
and hide-if
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
captureMedia
Programmatically open the file picker that enables the user to select and upload a file.
closeMedia
closeMedia
Programmatically close the file preview.
deleteMedia
deleteMedia
Programmatically clear a captured file.
deleteMedia
will trigger an on-change
if a function is assigned to it.
downloadMedia
downloadMedia
Programmatically trigger a download of the captured/displayed file.
getMetadata
getMetadata
Retrieve metadata about the captured file.
openMedia
openMedia
Programmatically open the file preview.
scrollIntoView
scrollIntoView
Programmatically scroll until the capture-file
/ display-file
component is visible in the view.
Last updated