Expand my Community achievements bar.

Asset link share functionality overlay with new sdk

Avatar

Level 1

With latest sdk release aem-sdk-2024.4.15977.20240418T174835Z-240300

adobe has changed the asset share link dialog UI and functionality. It is using spectrum and react front end components. client lib categories is dam-public-link-share, which is using /libs/dam/gui/components/admin/publiclinkshare/clientlibs/js/dam-public-link-share.755ba87f.js

This file is very big about 97298 lines, it seems that this file is generated from front end framework code. If anyone has details on the front end files, which files being used and related nodes for configuration please let us know.

 We just need to send the share link form to our custom servlet instead of out of box share link function.

 

What is the best way to have this functionality achieved? 

 

Note:Attaching the UI changes screenshot 

1 Reply

Avatar

Community Advisor

Hi @ddadfdsf ,

To customize the asset share link functionality in Adobe Experience Manager (AEM), you'll need to understand how the front-end components are structured and how they interact with backend services. Here's a general guide on how you might approach this:

  1. Understand the Frontend Structure:

    • Look into the front-end codebase to understand the structure and components involved in the asset share link functionality. Since it's using Spectrum and React components, you'll need to inspect the relevant React components, their dependencies, and how they interact with the backend.
  2. Identify Relevant Files:

    • In your case, the file dam-public-link-share.755ba87f.js seems to be the compiled version of the front-end code. You'll want to identify the source files that contribute to this compiled output. Look for JSX or TypeScript files that might contain the logic for generating the asset share link dialog.
  3. Customize Frontend Logic:

    • Once you've identified the relevant frontend files, you can modify them to send the share link form data to your custom servlet instead of the default behavior. You might need to add event listeners or modify existing ones to intercept the form submission and handle it accordingly.
  4. Backend Integration:

    • Implement your custom servlet to handle the share link form submission. This servlet will receive the form data and process it as needed. Make sure to handle any authentication or authorization requirements appropriately.
  5. Testing and Deployment:

    • Test your customizations thoroughly to ensure they work as expected. You may need to deploy the modified frontend and backend code to your AEM environment. Make sure to follow best practices for deployment and version control.
  6. Documentation and Maintenance:

    • Document your customizations thoroughly, including any changes made to the frontend code, backend servlet, and any configuration updates. This will help future developers understand the changes and maintain the codebase effectively.

Remember to check the Adobe Experience Manager documentation and community forums for any specific guidelines or best practices related to customizing asset share link functionality. Additionally, consider reaching out to Adobe support or consulting with experienced AEM developers for further assistance if needed.