Skip to content

Fix media url in data tab#410

Closed
martinlagler wants to merge 1 commit into2.5from
bugfix/media-url
Closed

Fix media url in data tab#410
martinlagler wants to merge 1 commit into2.5from
bugfix/media-url

Conversation

@martinlagler
Copy link
Copy Markdown
Member

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #409
License MIT

What's in this PR?

Use media redirect route to fix media url in data tab.


return $this->downloadUrl;
return $this->router->generate('sulu_media.redirect', [
'id' => $value,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep the caching mechanic with this->downloadUrl calling router->generate is a heavy process sadly which should be avoid in this kind of loops. So we added this mechanic to only generate once a wildcard urls with {id} and use str_replace

@martinlagler martinlagler deleted the bugfix/media-url branch July 14, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants