Is it possible to not allow upload of asset in DAM in case title and description for asset is not set | Community
Skip to main content
Level 4
November 23, 2022
Solved

Is it possible to not allow upload of asset in DAM in case title and description for asset is not set

  • November 23, 2022
  • 3 replies
  • 818 views

Hi TEam,

 

We are looking for ways to restrict upload of asset in folder where metadata schema is applied and title/description are not set, if these are set in file being uploaded then only upload the file.

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 SantoshSai

Hi @nehama ,

  • 'DAM Update Asset' workflow, there you can configure which file types should be allowed. Similarly, you can write custom workflowprocess service to check the title and description 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

3 replies

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
November 23, 2022

Hi @nehama ,

  • 'DAM Update Asset' workflow, there you can configure which file types should be allowed. Similarly, you can write custom workflowprocess service to check the title and description 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
VeenaVikraman
Community Advisor
Community Advisor
November 24, 2022

@nehama 

 

     It will depend on the version of AEM you are using. If you are using AEM on premise, then what @santoshsai mentioned might be one way to do it. But in AEM As Cloud, I am afraid there is no more support for DAM Update Asset Workflow. Instead they use asset microservices. I have no in-depth knowledge about the same at this point. But you can read about the same further here https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/assets-cloud-changes.html?lang=en

 

   May be listeners , or servlets will be a solution. 

 

 Thanks

Veena ✌

Mani_kumar_
Community Advisor
Community Advisor
November 24, 2022

If you need to restrict before the processing of asset below can be done

1. Write custom servlet and trigger once the asset is selected to upload

2. Extract the Metadata from the asset using some Java Metadata extractor

3. Check for the properties you want to validate

4. Return the success/failure message and then proceed to upload the asset.

 

Here you need to extract the Metadata from custom logic implemented in servlet

 

Hope this is helpful