<FileLink> controls are used to include links to download a file from the server to the client. The file can be provided either via a Technical Process using the process attribute or directly via a previously bound Base64 property with the data attribute.
Instructions for use
A <FileLink> control is created with the <FileLink> element.
<FileLink>
...
</FileLink>
<FileLink> controls can be used in all available layout types: For more information, see Layouts.
Attribute
Note:
There are a number of default attributes that can be set for all controls. For more information about the default attributes, see Default attributes.
In addition to the default attributes, you can define the following attributes for <FileLink> controls.
|
Attribute |
Description |
|---|---|
|
|
Use only if a Base64 file is offered for download! Specifies which file to download. Possible values: String for data binding The data binding expression must refer to a property of type |
|
|
Name of the file that is displayed in the Web App and is assigned as the file name for the downloaded file.
Possible values: Any string including file extension |
|
|
Identifier that can be used by the process developer.
Possible values: Any string |
|
|
Required Identifier for the Technical Process that supplies the data.
Possible values: Any string |
|
|
Technical Process that delivers the file. Possible values: String (URI) |
Example
The following example, with a file download from a static resource, shows how to use the <FileLink> tag. The 1.pdf file, which is to be made available for download, is located directly in the Resources folder and is delivered via the Technical Process process_1.wrf in the Services/Processes folder. Both a file and a Technical Process must exist for download.
The file link is defined in the web app definition above. For FileLink, a Technical Process is stored that supplies the file (process_1.wrf). A display name is assigned (displayName="example.pdf"), which is used as text in the Web App and as the file name of the download. The fileName attribute is not relevant in this example. This attribute can be used in more complex applications because it is returned to the processing Technical Process by the control.