I want to prevent the auto download of documents in asset share commons. Is there a config to do this?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Shaheena_Sheikh ,
To my knowledge ASC provides control over how assets are shared and accessed, but the auto-download behavior might not have a direct configuration setting. However, you can try to manage this behavior indirectly using
1. Access Controls: By allowing group/user read only access at folder level or asset level.
2. JavaScript-Based Solution: Utilize JavaScript to intercept the click event on the asset links and provide a custom behavior like
document.addEventListener('DOMContentLoaded', function() {
const assetLinks = document.querySelectorAll('.asc-asset-link'); // Example selector for ASC asset links
assetLinks.forEach(link => {
link.addEventListener('click', function(event) {
event.preventDefault(); // Prevent the default behavior (e.g., download)
// You can implement custom logic here, like displaying a confirmation modal or opening the asset in a new tab/window.
});
});
});
Let me know if it works
Hi @Shaheena_Sheikh : Please refer asset-share-commons documentation for enabling/disabling direct download option. Also, please check if it is supported for the version you are using.
https://opensource.adobe.com/asset-share-commons/pages/actions/download/#dialog--behavior
Hi @Shaheena_Sheikh: Did you get a chance to try this suggestion as well. Please let me know if this helps in some way.
Thanks.
Hi @Shaheena_Sheikh ,
To my knowledge ASC provides control over how assets are shared and accessed, but the auto-download behavior might not have a direct configuration setting. However, you can try to manage this behavior indirectly using
1. Access Controls: By allowing group/user read only access at folder level or asset level.
2. JavaScript-Based Solution: Utilize JavaScript to intercept the click event on the asset links and provide a custom behavior like
document.addEventListener('DOMContentLoaded', function() {
const assetLinks = document.querySelectorAll('.asc-asset-link'); // Example selector for ASC asset links
assetLinks.forEach(link => {
link.addEventListener('click', function(event) {
event.preventDefault(); // Prevent the default behavior (e.g., download)
// You can implement custom logic here, like displaying a confirmation modal or opening the asset in a new tab/window.
});
});
});
Let me know if it works
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies