Hi,
we have a requirement to check if the asset exists in the /content/dam path, the new file needs to over write the existing file.
is there any way to handle duplication in assets?
Solved! Go to Solution.
Views
Replies
Total Likes
Yes, there are several ways to handle duplicates in assets in Adobe Experience Manager (AEM). Here are a few approaches you can consider:
Overwrite existing assets: You can overwrite existing assets in AEM by using the same path to upload a new asset. When you upload a new asset with the same path as an existing asset, the new asset will replace the existing asset. This approach will allow you to overwrite existing assets in the /content/dam
path.
Automatically rename new assets: You can configure AEM to automatically rename new assets if a file with the same name already exists in the same folder. You can do this by setting the dam.auto.rename
property to true
. With this setting, AEM will append a unique identifier to the file name of new assets to ensure that no files are overwritten.
Custom duplicate handling: You can write custom code to handle duplicates in assets in AEM. For example, you can write a custom servlet that checks if an asset with the same name already exists in the /content/dam
path and performs some custom logic to handle duplicates. This approach will give you full control over how duplicates are handled in AEM.
These are just a few of the options available to handle duplicates in assets in AEM. The best approach will depend on your specific requirements and the constraints of your project.
Hi @Manisha_Mirchandani ,
for the upload through UI, there is a feature you can enable:-
However, for Assets API, afaik you need to write custom logic to detect and handle it, take a look at this blog post and thread if not already.
Hope that helps!
Regards,
Nitesh
Yes, there are several ways to handle duplicates in assets in Adobe Experience Manager (AEM). Here are a few approaches you can consider:
Overwrite existing assets: You can overwrite existing assets in AEM by using the same path to upload a new asset. When you upload a new asset with the same path as an existing asset, the new asset will replace the existing asset. This approach will allow you to overwrite existing assets in the /content/dam
path.
Automatically rename new assets: You can configure AEM to automatically rename new assets if a file with the same name already exists in the same folder. You can do this by setting the dam.auto.rename
property to true
. With this setting, AEM will append a unique identifier to the file name of new assets to ensure that no files are overwritten.
Custom duplicate handling: You can write custom code to handle duplicates in assets in AEM. For example, you can write a custom servlet that checks if an asset with the same name already exists in the /content/dam
path and performs some custom logic to handle duplicates. This approach will give you full control over how duplicates are handled in AEM.
These are just a few of the options available to handle duplicates in assets in AEM. The best approach will depend on your specific requirements and the constraints of your project.
Thanks @Jagadeesh_Prakash for multiple solutions, will try to implement which fits best according to the requirement.
Views
Likes
Replies
Views
Likes
Replies