Enables the uploading of binary data in a form. The processing of the file upload is the responsibility of the calling application. The element only results in markup on HTML based protocols.
WML does support file upload. Using this element may cause some WML browsers to show an error when the page is processed.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
initial | The initial value of the control | xs:string | none | optional | |
maxLength | The maximum number of characters in the content | xs:string | none | optional | |
name | The name of the control and the form variable returned to the server | xs:string | none | required |
<?xml version="1.0" encoding="UTF-8"?>
<canvas layoutName="/forms.mlyt" pageTitle="xfupload">
<xfform name="formControls" action="upload.jsp">
<xfupload name="datafile" maxLength="80" caption="Please select a file:"
prompt="Use the browse button to select a file." captionPane="controlCaption1"
entryPane="controlEntry1"/>
</xfform>
</canvas>
The forms.mlyt layout may have the following structure.