1

I am using Drupal 8 and I have a node with a file field. In one node, the uploaded file has spaces in it's filename. When I view the node directly, the shown file url is:

path/to/files/foo%20bar.pdf

And clicking the link opens the pdf just fine.

In views, I have a block of nodes' files with a global custom text field:

<span class="file-type {{ field_term_icon }}"></span>
<span class="file-title">{{ title }}</span>
<span class="file-meta">{{ extension }} / {{ filesize }}</span>

which itself has checked "Output this field as a custom link" while the link path is {{ field_file }}, but the output link becomes:

path/to/files/foo%2520bar.pdf

To me it looks like the url is decoded twice. Was this introduced in a recent update? How to fix it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.