Prevent document from auto downloading in asset share commons
I want to prevent the auto download of documents in asset share commons. Is there a config to do this?
I want to prevent the auto download of documents in asset share commons. Is there a config to do this?
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.