How to find all duplicate assets in AEM dam? | Community
Skip to main content
tarun11011991
Level 2
January 11, 2017
Solved

How to find all duplicate assets in AEM dam?

  • January 11, 2017
  • 15 replies
  • 17531 views

Hi,

I need to find all the duplicated assets in DAM.

I followed https://docs.adobe.com/docs/en/aem/6-2/author/assets/managing-assets-touch-ui/duplicate-detection.html

This document is not helping me in searching for all duplicate values. Also, it doesn't tell that i am uploading a duplicate asset. It just pops-up a window asking for replacing or create new version for that asset.

My priority is to get list of all duplicated DAM assets. Please advise

Thanks in advance.

Best answer by kautuk_sahni

Hi 

This is done by checking SHA 1 checksum value. 

//If the asset you upload already exists in AEM Assets, the Duplicates Detected dialog warns you that you are attempting to upload a duplicate asset. The dialog appears only if the SHA 1 checksum value of the binary of the existing asset matches that of the asset you upload. In this case, the names of assets is immaterial. In other words, the dialog can even appear for assets that have different names if the SHA 1 values for their binaries are the same. With each asset uploaded you will see SHA 1 JCR node created.

So in you use-case you need to write a custom service to do the needful.

Where to find SHA1 number in Image Assets -> jcr:content ->metadata -> dam:sha1  (/content/dam/geometrixx-outdoors/banners/best-season.jpg/jcr:content/metadata)

I hope this would help you.

Thanks and Regards

Kautuk Sahni

15 replies

kautuk_sahni
Community Manager
Community Manager
January 12, 2017

TARUN SINGH wrote...

I am using AEM 6.1 SP2
I am attaching screenshots for metadata vaule for 3 assets which is actually same image with different names.


 

 

From the 1.png, I could see that all the three image have different sizes. So image would not be considered as same.

~kautuk

Kautuk Sahni
Level 3
January 12, 2017

Hi,

You can write a query to search for the same node name under dam path to check if there are same name images present in different folders.

Regards,

Ashwin Raju

kautuk_sahni
Community Manager
Community Manager
January 13, 2017

Hi 

Moving this thread to AEM "Asstes" topic so to have better contextual experts have a look at this.

~kautuk

Kautuk Sahni
narsie26860678
April 27, 2018

Hi,

  Is there any way to know the total size of all assets in DAM?

Thanks

Narsi.

tarun11011991
Level 2
May 2, 2018

AEM 6.2 - Dam Assets information

you will find this useful.