- Issue created by @Froozeify
While working on a twig integration with some pdf file I was looking for a way to disable the default download behavior so browser could preview the pdf.
In the project page, it should be added an example like those ones :
You can specify the browser to display the file (inline) instead of downloading it (default module behavior)
Twig :
url('media_entity_download.download', {'media': media_id, 'inline': true})
PHP :
$url = Url::fromRoute(
'media_entity_download.download',
[
'media' => $media_id,
'inline' => true
]
);
Active
2.3
Documentation