fileDownload - File Download

Downloads a file to the local file system.

Category

Core Controls

Syntax

<xp:fileDownload attributes>content</xp:fileDownload>
Table 1. Essential properties
Property Description
id Defaults to fileDownload1, fileDownload2, and so on.
value Binds the file control to a data element or other value which must be of type rich text.
mimetype Forces the MIME type of the download rather than letting it be determined by the file type.
useUploadName By default the original file name is used.
filename Specifies the attachment name if you do not use the original file name.

Usage

At run time, information about any attached files appears on the page. This may include file type, size, name, modification date, creation date, and whether the user can delete the attached file. The user can click on the name to access a file browser to download the attached file.

Examples

This File Download control allows the user to download a file from the Body item of a document.
<xp:fileDownload rows="30" id="fileDownload1"
	displayLastModified="false" value="#{document2.body}">
</xp:fileDownload>