Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds parameter support to Asset Rendtions.
So now, instead of only passing in the
renditionName
, you can pass in therendtionName
as well as arbitrary parameters.HTTP API
HTTP GET /content/dam/test.png.renditions/my-parameterized-rendition-name/asset.rendition?param1=foo@param2=bar
Or for downloads, pass in the
renditionName
HTTP POST form value:my-parameterized-rendition-name?param1=foo@param2=bar
This requires an OSGi config for the appropriate Asset Rendition dispatcher to be created that has a mapping of the
my-parameterized-rendition-name` whose value has placeholders corresponding to the provided params.
For examples:
com.adobe.aem.commons.assetshare.content.renditions.impl.dispatchers.StaticRenditionDispatcherImpl-parameterized.cfg.json
would look for static renditions that match the regex
(.*)foo(.*)
...This can be used in any of the OOTB rendition dispatchers (External, Asset Delivery, etc.)
It is recommended that each definition uses a unique rendition name (left side of the
renditionName=mapping rule
in the OSGi config). It is also recommended to use this withhidden: true
in the OSGI config as none of the OOTB ASC components have anyway to provide extra parameters, so they shouldnt be selectable by authors in these components.THese are best use "hardcoded" into code to serve images, w/ params specified using some custom logic, or via custom dialogs that accept the expected params.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: