How do you provide download links for attached PDFs in Zotonic?
I would like to let my content authors upload PDFs and provide download links. 开发者_StackOverflowUnfortunately, 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?
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>
精彩评论