Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

To display popup before moving assets to check for duplication

Avatar

Level 2

Hi All,

 

 I have a requirement of displaying a pop-up window before moving the assets to destination folder using the MOVE option if the asset already exists in the destination folder. As of now, when the asset is already present in the destination, AEM creates creates the duplicate by appending numeric values.

 

Is there any way to check for asset duplication before the asset is being move and notify user through popup? 

 

Thanks in Advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

There is no ootb way @nithya90 
You'll have to develop your own logic to check if the asset is already present at destination.


What you can do is modify the move operation from granite UI to check for duplication first.
You may need to check for yourself data fetching and passing into servlet calls in below logic.


1. For this create a custom servlet which simply fetches source and destination paths from request along with assets being moved and returns to FE if any of the asset is already present at destination.


2. Now you need to customize the AEM UI to invoke your servlet on move event ( this event you can check on ".cq-damadmin-admin-actions-move-activator" button ) and handle the response.


3. From inside the handler of your servlet at FE, you can call the ootb move asset API for assets if they are not already present at destination , if duplicates are there then display pop up using granite pop up via javascript.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

There is no ootb way @nithya90 
You'll have to develop your own logic to check if the asset is already present at destination.


What you can do is modify the move operation from granite UI to check for duplication first.
You may need to check for yourself data fetching and passing into servlet calls in below logic.


1. For this create a custom servlet which simply fetches source and destination paths from request along with assets being moved and returns to FE if any of the asset is already present at destination.


2. Now you need to customize the AEM UI to invoke your servlet on move event ( this event you can check on ".cq-damadmin-admin-actions-move-activator" button ) and handle the response.


3. From inside the handler of your servlet at FE, you can call the ootb move asset API for assets if they are not already present at destination , if duplicates are there then display pop up using granite pop up via javascript.

Avatar

Administrator

@nithya90 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni