DownloadLink

Description

Produces a direct link into a resource, which can be streamed as raw data with a content type specification.

Deprecated
This component has been deprecated and you should use the StreamLink instead. The StreamLink has the same abilities as the DownloadLink but can take more than one parameter.

Parameters

Name Type Required Default Description
downloadResourceId java.lang.String yes An application specific id, identifying the resource to be downloaded. The DownloadService will pass this id into the configured DownloadResourceSource extension at runtime when a link rendered by this component is clicked.
downloadResourceSourceExtentionName java.lang.String no literal:resourcesource The name of the DownloadResourceSource extention the DownloadService should use to fetch download data.

The name will be prefixed: 'bayeux.downloads'.

Ex: The DownloadResourceSource extention defined in your <servlet-name>.application file could be named 'bayeux.downloads.mydownload' where 'mydownload' is given as value to this parameter.

Further info

  • Body: Rendered
  • Informal parameters: Allowed
  • Reserved parameters: href

Requirements

This component uses the DownloadService service which in turn requires specific configuration of a download resource source. Please refer to the service for configuration of that thingi.

Example

Presuming you have defined bayeux library in you application under the library name "bayeux":
<a href="#" jwcid="@bayeux:DownloadLink" downloadResourceId="123">Download 123 resouce</a>
or define a specific DownloadResourceSource to use:
<a href="#" jwcid="@bayeux:DownloadLink" downloadResourceId="literal:123" downloadResourceSourceExtentionName="literal:differentdownloadsource">Download 123 resouce</a>