내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Changing the downloaded filename using Dynamic Media on AEM

Avatar

Level 3

Hi all,

We get a lot of requests from our customers to deliver assets with different, customer specific filename conventions (e.g. PRODUCTID_SHOTCODE.jpg), which isn't the name we give the files in AEM Assets. This applies to images, files etc.

 

I've gone through the Image Serving API for dynamic media (https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-se...) but can't find anything in there that suggests how to do this. Essentially, I want to be able to do something like:

 

https://s7d1.scene7.com/is/image/3m/Cat?crop=100,100,300,300&downloadFilename=croppedcat.jpg

 

This would allow us to build other integrations with our product catalogue and data syndication tools to mass download assets with the right names by default, prior to sending to customers, rather than having to download everything and then run a rename script.

 

Does anyone know if this is possible?

 

Thanks!

 

 

Paul.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee Advisor

Hi Paul,

Welcome to Adobe Community !!

URL transformation is possible when you have applied rulesets on that configured Dynamic Media account (on your AEM Assets Author)

Detailed information available here : https://experienceleague.adobe.com/docs/experience-manager-65/assets/dynamic/using-rulesets-to-trans...

In case you need example for rulesets and how they are created, please refer to this document : https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-se...

 

Note : Please test rulesets on a Dynamic Media Staging environment or a test account on your Dynamic Media Production environment.
Thanks,

Vikram Gaur

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Employee Advisor

Hi Paul,

Welcome to Adobe Community !!

URL transformation is possible when you have applied rulesets on that configured Dynamic Media account (on your AEM Assets Author)

Detailed information available here : https://experienceleague.adobe.com/docs/experience-manager-65/assets/dynamic/using-rulesets-to-trans...

In case you need example for rulesets and how they are created, please refer to this document : https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-se...

 

Note : Please test rulesets on a Dynamic Media Staging environment or a test account on your Dynamic Media Production environment.
Thanks,

Vikram Gaur

Avatar

Level 3

Thank you @Vikram_Gaur_ , that's really helpful! If I'm reading it correctly, this says that we could supply a specific URL parameter and use that to reformat the response URL, e.g. with the example

 

https://s7d1.scene7.com/is/image/3m/Cat?crop=100,100,300,300&downloadFilename=croppedcat.jpg

 

 

<rule>
   <expression>#CLEVER_REGEX_TO_FIND_"downloadFilename"_AND_PULL_QUERY_PARAMETER_"croppedcat.jpg"#</expression>
   <substitution>#REPLACE_FILENAME_WITH_"croppedcat.jpg"#</substitution>
</rule>

Is that right, i.e. we can program the rulesets to do something specific if we deliver a specific URL structure?

 

Thanks,

 

 

Paul.

Avatar

Employee Advisor

Hi Paul

That looks good.

You just have to create a "CLEVER_REGEX" now.

For example myCat/myImage/small would translate to myCat/smallTemplate?src=myCat/myImage 

 

Using this rule : 

<rule>
   <expression>([^/]+)/(small|medium|large)$</expression>
   <substitution>$2Template?src=sample/$1</substitution>
</rule>

 

Thanks,

Vikram Gaur