Allow image upload with correct name only in AEM Cloud | Community
Skip to main content
Level 3
April 23, 2024
Solved

Allow image upload with correct name only in AEM Cloud

  • April 23, 2024
  • 5 replies
  • 1518 views

Hi Team,

 

Is there any way to restrict the authors to upload the assets in DAM with proper naming conventions only else show error while uploading?

I am using AEM CLoud service.

 

Thanks,
SD

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

5 replies

aanchal-sikka
Community Advisor
Community Advisor
April 23, 2024
SDusaneAuthor
Level 3
April 24, 2024

Hi @aanchal-sikka ,

 

I tried this but it is not working, do we have any other solution for this?

 

Thanks,

SD

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
April 24, 2024
chaudharynick
Level 4
April 25, 2024

Hi @sdusane ,

 

Can you try referring to this document?

http://experience-aem.blogspot.com/2021/01/aem-cloud-service-validate-asset-file-extensions-upload.html

it checks for file extensions and code can be modified to add specific naming convention check on the file name.

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

@sdusane 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
HrishikeshKagne
Community Advisor
Community Advisor
May 5, 2024

Hi @sdusane ,

In Adobe Experience Manager (AEM) as a Cloud Service, you can enforce naming conventions for assets uploaded to the Digital Asset Management (DAM) by implementing custom validation logic. Here's a general approach to achieve this:

  1. Custom Asset Metadata Schema: Define a custom metadata schema for assets in the DAM. Include a metadata field for the asset name according to your desired naming convention.

  2. Client-Side Validation: Implement client-side validation using JavaScript to enforce the naming convention when users upload assets through the AEM user interface. This validation can be applied directly on the asset name input field to provide real-time feedback to authors.

  3. Server-Side Validation: Implement server-side validation to enforce naming conventions when assets are uploaded programmatically or through batch processes. This validation can be performed as part of an asset workflow or custom asset upload servlet.

  4. Error Handling: Provide clear error messages or notifications to authors when an asset fails validation due to incorrect naming conventions. This helps authors understand the requirements and correct any issues before attempting to upload the asset again.

  5. Documentation and Training: Document the naming conventions and validation rules for assets in the DAM, and provide training to authors on how to adhere to these conventions during asset uploads.

  6. Continuous Monitoring: Regularly monitor asset uploads and enforce naming conventions consistently to maintain data integrity in the DAM.

  7. Feedback and Iteration: Gather feedback from authors and stakeholders to refine the naming conventions and validation rules over time. Continuously improve the validation logic based on usage patterns and evolving requirements.

By implementing custom validation logic and enforcing naming conventions for assets uploaded to the DAM in AEM as a Cloud Service, you can ensure consistency and organization in your digital asset management processes.

Hrishikesh Kagane
kautuk_sahni
Community Manager
Community Manager
May 16, 2024

@sdusane 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.

Kautuk Sahni