Expand my Community achievements bar.

Adding Watermark and restricting download permission

Avatar

Level 3

Hi,

I am already having a scheduler and jobs to run to move the archived assets to the archive folder. On top of that I have a requirement were i need to add the watermark for the images and want to restrict the download permission for the assets which are expired in AEM cloud.If anyone knows the best way to achieve this , please let me know here. Thanks in advance.

 

 

Regards,

Bhavani Bharanidharan 

 

3 Replies

Avatar

Community Advisor

Hi @BhavaniBharani 
Please refer
https://experienceleague.adobe.com/docs/experience-manager-learn/assets/advanced/watermarks.html?lan... 
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/manage/water... 
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-can-we-add-watermark-t... 

  1. Adding Watermark to Images:

    • Create a custom workflow in AEM to add a watermark to images. This workflow can be triggered manually or automatically when assets are uploaded or modified.
    • In the workflow, use the "Image Processing" step to add the watermark to the images. You can use the AEM Image API or a third-party library like Apache PDFBox or iText to add the watermark.
    • Configure the workflow to save the processed images with the watermark to a specific location or replace the original images.
    • Test the workflow to ensure that the watermark is added correctly to the images.
  2. Restricting Download Permission for Expired Assets:

    • Create a custom workflow in AEM to handle the expiration of assets. This workflow can be triggered manually or automatically based on a schedule or event.
    • In the workflow, use the "Asset Metadata" step to check the expiration date of the assets. You can retrieve the expiration date from a metadata field or a custom property.
    • If an asset is expired, update its permissions to restrict download access. You can use the AEM Asset API to update the permissions and set the appropriate access controls.
    • Test the workflow to ensure that the permissions are updated correctly for expired assets.
  3. Scheduling the Workflows:

    • Configure a scheduler in AEM to run the custom workflows at specific intervals or based on a cron expression.
    • Set the scheduler to trigger the workflow that adds the watermark to images and the workflow that restricts download permission for expired assets.
    • Test the scheduler to ensure that the workflows are executed as expected at the scheduled times.


Avatar

Level 3

Hi @Raja_Reddy ,

Thanks a lot for your points. We are already having a workflow that is used to archive the assets and one scheduler to run. So, i thought of adding the watermark as a new step in the existing workflow.

I can able to see that one properties is already there to add a watermarking, when i try to add this in my workflow model i can able to upload a image to watermark the assets.

I am working on the AEM workflow for the first time, so i am having a doubt like. how this workflow will get called. I have searched the existing workflow name in my codebase, i can able to see that the workflow name is there only in the WF model, not sure WF model will triggered when and how 

Also for restricting the download access i am thinking to add in the existing workflow model. Can you please help to give a clarifications for the above. 

BhavaniBharani_0-1709118906227.png

Thanks,

Bhavani Bharanidharan

Avatar

Administrator

@BhavaniBharani Did you find the suggestion 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