Reputation: 698
I want to have a link on my application which when clicked downloads a pdf file saved in the assets folder. When I am clicking the link it is downloading the pdf but on opening it, it is giving the error:
Failed to load pdf document.
<a class = "help-link" download="User-Guide-televiewer" target="_blank" href="/assets/televiewer-file.pdf">
Help
</a>
Upvotes: 0
Views: 691
Reputation: 698
I was manually creating the pdf file with .pdf extension. Nothing wrong with the code. Just the file error.
Upvotes: 1