Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Rename the Assets during the upload

Avatar

Level 2

Hi All,

 

We have a requirement to append the BU(Business Unit) with Assets while uploading the asset itself automatically.

e.g i selected abc.jpg while uploading so it should stored in dam with name xyz-abc.jpg(xyz is the BU Name).

 

Please suggest the best way to achieve this.

 

Regards

Bikash Singh

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Bikas

      One way to do this would be to create a custom workflow launcher to listen to the uploads under your project path and as soon as an upload happens you can re-write the file name, but make sure it doesn't conflict with the DAM Update Asset Workflows.

 

Thanks

Veena ✌

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi Bikas

      One way to do this would be to create a custom workflow launcher to listen to the uploads under your project path and as soon as an upload happens you can re-write the file name, but make sure it doesn't conflict with the DAM Update Asset Workflows.

 

Thanks

Veena ✌

Avatar

Community Advisor
  • As Veena mentioned use Custom workflow to change the name of asset. which will change the name of the asset.
  • Just adding on to that ,you can disable the Update Asset workflow for a while while uploading the asset once the asset got uploaded you can enable it. This is for avoiding conflict with Update Asset workflow. 
  • You can call "update Asset workflow" from your own custom workflow model, after the step where you are changing the name of asset.
  • For already uploaded assets you can write groovy script to append the BU in your aseets