I’m trying to add file(PDF) download link with HTML ‘a’ tag.
this is what I did
<a href="../assets/document/swb-doc.pdf" download="swb_introduction.pdf"
target="_self">INTRODUCTION</a>
when I click the link, chrome does download "swb_introduction.pdf" but it says "Failed, File doesn’t exist"
How can I fix this problem ?
2
Answers
Modify the href:
Have you tried to download the file by writing the full url into your browser instead? Does it work there?
My guess is that either your path is wrong or that file is not accessible, due to misconfigured rights.
It would help to add your project structure to your question.