fix: use correct DM delivery URLs per asset MIME type#832
Open
actinium15 wants to merge 3 commits intoadobe:mainfrom
Open
fix: use correct DM delivery URLs per asset MIME type#832actinium15 wants to merge 3 commits intoadobe:mainfrom
actinium15 wants to merge 3 commits intoadobe:mainfrom
Conversation
Documents (PDF, DOCX, CSV, ZIP) now use /original instead of the web-optimized image delivery URL. Videos use /play by default. Both are configurable per-project via 'aem.asset.document.mimetypes'.
Author
|
@sagarsane, @andreas-haller, could you please take a look? I'm esp interested in knowing if the changes you intended to add via #806 are accounted for or not (they should be imo). |
sagarsane
reviewed
Mar 9, 2026
sagarsane
reviewed
Mar 9, 2026
| const ASSET_SELECTOR_URL = 'https://experience.adobe.com/solutions/CQ-assets-selectors/static-assets/resources/assets-selectors.js'; | ||
|
|
||
| // MIME types that use /original rendition instead of web-optimized or /play delivery. | ||
| // Configurable per-project via 'aem.asset.document.mimetypes' (comma-separated). |
There was a problem hiding this comment.
@auniverseaway @chrischrischris I'm thinking we probably don't need to configure this per project .. and by default only support whatever Dynamic Media OpenAPI supports (which is the list below). WDYT?
Author
There was a problem hiding this comment.
I think we should have that config. two reasons:
- the list isn't comprehensive since assets beyond these four may also require original download (pptx, doc, txt, ...) and DM with OpenAPI does support them
- videos are interesting, because while
/playis ideal, some customers may want to use mediabus to deliver mp4s and may require original there (and this can serve as an override)
- Original rendition: /original/as/{name} (was missing /as/{name})
- Web-optimized: /as/{baseName}.avif, always avif with extension stripped
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
/originalinstead of the web-optimized image delivery URL (/as/{name})/playby defaultaem.asset.document.mimetypesin the project config to a comma-separated list of MIME types that should use/original(overrides the defaults entirely, including for video MIME types if listed)Routing logic (DM delivery mode)
useOriginalMimetypes/originalvideo/*(not in above list)/play/as/{name}Default
aem.asset.document.mimetypesTest plan
/original/original/original/play/as/{name}aem.asset.document.mimetypestovideo/mp4in project config — verify MP4 asset URL ends with/original