Hi All,
We have a requirement to download asset in original file format without zipping the file. Suppose if we try to download the jpg file, it should be downloaded as jpg files format itself. Could anyone suggest any way to achieve that ?
Solved! Go to Solution.
Views
Replies
Total Likes
@Shelson
You can simply update the HTML button to have an anchor tag with a href of the JPEG(or equivalent) asset path.
/apps/asset-share-commons/components/details/action-buttons/action-buttons.html
<button class="ui primary button cmp-action-buttons__button" data-asset-share-id="download-asset" data-asset-share-asset="${asset.path}" data-asset-share-license="${config.licenseEnabled ? asset.properties['license'] : ''}" data-sly-test="${properties['downloadLabel'] && config.downloadEnabled}"> ${properties['downloadLabel']} </button>
Hi @Shelson
This can be done by overriding AssetDownloadServlet. Please refer this article for implementation details
https://aem4beginner.blogspot.com/overriding-out-of-box-servlet-in-aem
Hope this helps.
Regards,
Rajashankar.R
Tried this but doesn't work as expected. Could you please suggest any other solution ?
@Shelson
You can simply update the HTML button to have an anchor tag with a href of the JPEG(or equivalent) asset path.
/apps/asset-share-commons/components/details/action-buttons/action-buttons.html
<button class="ui primary button cmp-action-buttons__button" data-asset-share-id="download-asset" data-asset-share-asset="${asset.path}" data-asset-share-license="${config.licenseEnabled ? asset.properties['license'] : ''}" data-sly-test="${properties['downloadLabel'] && config.downloadEnabled}"> ${properties['downloadLabel']} </button>
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies