The <FILEPICKER/> widget opens the native filepicker allowing the user to select a file from the underlying operating system. It is somewhat unique in that is both a display widget as well as a file data source.
Attributes
Name
Type
Default
Description
Req
allow
string
The filetype extensions allowed by the filepicker, comma seperated string.
Events
Name
Description
onstart
A list of ; separated event's to evaluate and execute when the filepicker is launched
ondismissed
A list of ; separated event's to evaluate and execute when the filepicker closes
Methods
Name
Type
Description
launch()
Opens the filepicker
Examples
<FML>
<COLhalign="center"visible="=noe({formdata.data.F20060})">
<FILEPICKERallow=".png,.jpg,.jpeg"id="f1"onsuccess="toast('Image uploaded')"onfail="toast('Upload error, please retry')"/>
<BUTTONonclick="f1.start();">
<BOXexpand="false"maxwidth="300"border="all"bordercolor="=!noe({f1.data.file}) ? green : 'orange'"padd="20">
<ICONicon="camera"visible="=noe({f1.data.file})"/>
<IMAGEwidth="250"url="={f1.data.file}"visible="=!noe({f1.data.file})"/>
</BOX>
</BUTTON>
<TEXTvalue="Image captured, tap to retake"color="grey"visible="=!noe({f1.data.file})"/>
</COL>
</FML>