Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Custom File Name Length Validation in AEM Assets

Avatar

Level 2

Hi

I need to add custom validation for a number of characters in name of the file in the AEM 6.5 asset upload,
so a file with a name of more than a certain no of characters cannot be uploaded.


Any help would be greatly appreciated,

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @shubham_naik ,

  • 'DAM Update Asset' workflow, there you can configure which file types should be allowed. Similarly, you can write custom workflowprocess service to check the name of the asset and restrict the uploads accordingly.
  • You could create a custom sling servlet, that will upload assets for you. There you can insert your logic to restrict anything.

Hope that helps!

Regards,

Santosh


Santosh Sai

AEM BlogsLinkedIn


View solution in original post

3 Replies

Avatar

Community Advisor

Hi @shubham_naik 

Please find the below query which is similar to your requirement,

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/extending-file-name-valida...

 

Hope this helps!

Avatar

Level 2

Yes, I have already come across this post, but I want to add a custom alert message as well along with the condition.

Avatar

Correct answer by
Community Advisor

Hi @shubham_naik ,

  • 'DAM Update Asset' workflow, there you can configure which file types should be allowed. Similarly, you can write custom workflowprocess service to check the name of the asset and restrict the uploads accordingly.
  • You could create a custom sling servlet, that will upload assets for you. There you can insert your logic to restrict anything.

Hope that helps!

Regards,

Santosh


Santosh Sai

AEM BlogsLinkedIn