Expand my Community achievements bar.

SOLVED

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

Avatar

Level 4

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @NehaCMS ,

  • '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

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @NehaCMS ,

  • '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

Avatar

Community Advisor

@NehaCMS 

 

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

 

   May be listeners , or servlets will be a solution. 

 

 Thanks

Veena ✌

Avatar

Community Advisor

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