How would I click on a link (a tag) and open a PDF stored un public/pdf folder in Next.js?

Viewed 803

I am using next to create a site, I have folder public/pdf/example.pdf and want to open this in a new window when user clicks on the link (a tag). Which looks like this:

<a href="/pdf/nameofpdf.pdf" target="_blank">click</a>

However, in the new window I get failed to load PDF document.

How would I go about opening a pdf using Nextjs?

0 Answers
Related