{% if resource.media is not empty %}
    {% set name = resource.media.name %}
    {% if name is empty %}
        {% set name = "Download" %}
    {% endif %}
	<p class="download-pp"><a href="{{ asset(upload_dir~resource.media.show()) }}" target="_blank" class="download">{{ name }}</a> <span>| {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}</span></p>
{% endif %}

{% if resource.media is not empty %}
    {% set name = resource.media.name %}
    {% if name is empty %}
        {% set name = "Download" %}
    {% endif %}
    <p class="download-pp"><a href="{{ asset(resource.media.url) }}" target="_blank" class="download">{{ name }}</a> <span>| {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}</span></p>
{% endif %}


Use URL method for media in downloadpagepart view
Use URL method for media in downloadpagepart view
