Uploading New Versions of an Asset in AEM Assets | Community
Skip to main content
Erika_Antkowiak
Level 4
April 3, 2024
Solved

Uploading New Versions of an Asset in AEM Assets

  • April 3, 2024
  • 3 replies
  • 3870 views

Hi team, 

 

We are currently testing the capabilities of AEM Assets and we have been able to find videos that walk us through how to upload new versions of assets in AEM Assets. We have been unable to find any that help us fully understand how the naming convention of the new asset needs to be the same as the existing asset in AEM Assets to be added as a new version. I've recently uploaded a new asset with the same name as the existing asset into AEM Assets and it uploaded as a new separate asset in the system. Is there a reason why this would happen? Would metadata have anything to do with it? Has anyone else had this experience or know of any documentation that covers the naming convention and versioning relationship in depth? 

 

Best,

E

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by krati_garg

Hi @erika_antkowiak 

 

Please find answers inline:

 

We have been unable to find any that help us fully understand how the naming convention of the new asset needs to be the same as the existing asset in AEM Assets to be added as a new version.

[KG]: To get a prompt for new version while uploading another asset, there are following rules:

1. New asset should be uploaded in the same folder as the older one for creating a new version

2. File Extension should be same

3. File Name should be same

Not meeting any of the above rules would make AEM believe that its a new asset and it will not prompt you for a new version.


I've recently uploaded a new asset with the same name as the existing asset into AEM Assets and it uploaded as a new separate asset in the system.

[KG]: Please check out above response

Is there a reason why this would happen? Would metadata have anything to do with it? Has anyone else had this experience or know of any documentation that covers the naming convention and versioning relationship in depth? 

[KG]: As per OOTB functionality, as far as same filename+extension matches, it would detect the new asset upload as a candidate for new version. However, if you want to customize this behavior based upon binaries, you might need to enable duplicate detection config "Day CQ DAM Create Asset" OSGI config. This config depends upon dam:sha1 value(by default - can be changed to any other metadata asset property).

dam:sha1 is  SHA 1 checksum value of the binary and if this is same for any two assets, it would not even check for Filenames and would take both assets as same and shall prompt you for new version.

 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/admin/detect-duplicate-assets

 

Hope this helps

3 replies

Kamal_Kishor
Community Advisor
Community Advisor
April 4, 2024

@erika_antkowiak : 

For asset versioning, it seems to work with same name only (I have tested on 6.5).


However, there is a way to identify if the same Asset already exists in entire Assets irrespective of its name or assets path. This would help to know if same asset already exists and at which path it is present.

Please refer: for AEMaaCS: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/admin/detect-duplicate-assets
For AEM 6.5: https://experienceleague.adobe.com/en/docs/experience-manager-65/content/assets/managing/duplicate-detection

 

The detect duplicate feature is now enabled in Assets. When a user attempts to upload an asset that exists in Experience Manager, the system checks for conflict and indicates it. The assets are identified using SHA-1 hash stored at jcr:content/metadata/dam:sha1, which means duplicate assets are detected irrespective of the filenames.

 

I am not sure if this helps with your use-case but let me know if it does.
thanks.

krati_garg
Adobe Employee
krati_gargAdobe EmployeeAccepted solution
Adobe Employee
April 4, 2024

Hi @erika_antkowiak 

 

Please find answers inline:

 

We have been unable to find any that help us fully understand how the naming convention of the new asset needs to be the same as the existing asset in AEM Assets to be added as a new version.

[KG]: To get a prompt for new version while uploading another asset, there are following rules:

1. New asset should be uploaded in the same folder as the older one for creating a new version

2. File Extension should be same

3. File Name should be same

Not meeting any of the above rules would make AEM believe that its a new asset and it will not prompt you for a new version.


I've recently uploaded a new asset with the same name as the existing asset into AEM Assets and it uploaded as a new separate asset in the system.

[KG]: Please check out above response

Is there a reason why this would happen? Would metadata have anything to do with it? Has anyone else had this experience or know of any documentation that covers the naming convention and versioning relationship in depth? 

[KG]: As per OOTB functionality, as far as same filename+extension matches, it would detect the new asset upload as a candidate for new version. However, if you want to customize this behavior based upon binaries, you might need to enable duplicate detection config "Day CQ DAM Create Asset" OSGI config. This config depends upon dam:sha1 value(by default - can be changed to any other metadata asset property).

dam:sha1 is  SHA 1 checksum value of the binary and if this is same for any two assets, it would not even check for Filenames and would take both assets as same and shall prompt you for new version.

 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/admin/detect-duplicate-assets

 

Hope this helps

Erika_Antkowiak
Level 4
April 4, 2024

@krati_garg Thanks for the outline you provided! I'm wondering if you could elaborate on your - File Extension should be the same - note. Can you explain the difference between the File Extension and the File Name? I want to make sure I understand.

 

Best,

E

Adilos-Cantuerk
Community Advisor
Community Advisor
April 4, 2024

Hi @erika_antkowiak Well let me jump in here real quick
@krati_garg most likely meant the suffix -  
logo-new.eps vs logo-new.svg 
logo-new beeing the file name and svg/eps/ai etc. to be the file extension.
I would also like to add that the file name is considered case sensitive.
So "logo-new.eps" can't be versioned with "Logo-New.eps".

There was a time when the filename was displayed in all caps - which caused some confusion when somebody wanted to create a version.

@krati_garg, please correct me if I am wrong - but I do think that metadata has an impact on dam:sha1. 

So in case you upload logo-new.eps into folder A, then edit some metadate, e.g. add a text to its dc:description, and then later upload the same logo-new.eps into folder B - the duplication detection might not be able to recognise it as a duplicate.

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 9, 2024

@erika_antkowiak Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community

Esteban Bustamante