How do you provide download links for attached PDFs in Zotonic?

252 views Asked by At

I would like to let my content authors upload PDFs and provide download links. Unfortunately, they get a page with a preview of the first page of the PDF instead of the PDF itself when they link to it.

How do you provide download links for attached PDFs in Zotonic?

1

There are 1 answers

0
Alain O'Dea On BEST ANSWER

The following snippet (given a RSC id of the media as pdf_rsc) will provide a download link:

<a href="/media/attachment/{{ m.rsc[pdf_rsc].filename }}">Download {{ m.rsc[pdf_rsc].title }}</a>