I have created a content type with a number of fields including file fields. In the node template for that CT (node--unit.html.twig) I am able to get the details with the following code:
{% if content.field_files.0 %}
{% for key, value in content.field_files if key|first != '#' %}
<a href="{{ file_url(content.field_files[key]['#file'].uri.value) }}">{{ content.field_files[key]['#description']}}</a>
{% endfor %}
{% endif %}
Now I'm trying to get those same details for the field inside a view that lists nodes of that CT but the above code doesn't work. In fact all I can get from the field is the 'content' using the following code inside the views-view-field template (views-view-fields--units-e-resource-sheets.html.twig):
{{ fields.field_e_resources.content}}
All I can find using kint and other tools is the target_id attribute. Do I have to use this to retrieve those other details in the view?