Download (v1)
Download component written in HTL that displays a downloadable asset on the page.
Features
- Displays an asset on the page for download with the following elements:
- Title
- Description
- File Size, File Format, Filename
- Action
- Optionally allows assets to be displayed inline in the browser rather than directly downloaded.
- Direct upload from a local file system is configurable.
- Download Servlet with support for conditional header information and Content-Disposition.
- Style System support.
Use Object
The Download component uses the com.adobe.cq.wcm.core.components.models.Download Sling model as its Use-object.
Component Policy Configuration Properties
The following configuration properties are used:
./allowUpload- defines whether direct upload from a local file system is allowed../titleType- defines the HTML element to use for the download title../displaySize- defines whether the file size should be displayed../displayFormat- defines whether the file format should be displayed../displayFilename- defines whether the filename should be displayed../hideTitleLink- defines whether the title link should be hidden.
Edit Dialog Properties
The following JCR properties are used:
./fileReference- defines the path to the asset from DAM../inline- defines whether the download item should be displayed inline in the browser vs. attachment../jcr:title- defines the download title../titleFromAsset- defines whether the title should be taken from the DAM asset title../jcr:description- defines the download description../descriptionFromAsset- defines whether the description should be taken from the DAM asset description../actionText- defines the action text../id- defines the component HTML ID attribute.
BEM Description
BLOCK cmp-download
ELEMENT cmp-download__title
ELEMENT cmp-download__title-link
ELEMENT cmp-download__description
ELEMENT cmp-download__properties
ELEMENT cmp-download__property
MOD cmp-download__property--<property>
ELEMENT cmp-download__property-label
ELEMENT cmp-download__property-content
ELEMENT cmp-download__action
ELEMENT cmp-download__action-text
Information
- Vendor: Adobe
- Version: v1
- Compatibility: AEM 6.3
- Status: production-ready
- Documentation: https://www.adobe.com/go/aem_cmp_download_v1
- Component Library: https://www.adobe.com/go/aem_cmp_library_download
- Author: bkheadwire
- Co-authors: Burkhard Pauli
If you were involved in the authoring of this component and are not credited above, please reach out to us on GitHub.