In the Episerver back office I have a content refrence that has a PDF file as its data.
On the front end (Razor view) I am using this code to output the PDF
<a href="@Url.ContentUrl(Model.PdfMedia)" class="btn btn-primary" tabindex="-1">@Model.CurrentBlock.DownloadPdfText</a>
When a user clicks this link, the PDF is opened in the browser, I want the browser to download the PDF and NOT open it in the browser.
One thing I noticed is that the URL genrated is /globalassets/PDF-File-Name........ but this URL is not the URL to the actual location of the PDF file, how can I get this URL? and how can I force the browser to download the PDF rather than open it?