I use the PDF viewer element and when I enter the URI of my PDF, it downloads it instead of displaying it.
Seems like it comes from my URI as the sample URL provided with the element displays the PDF without problem, but I can’t figure out what is the problem.
Does someone know what could be causing this issue ?
I managed to solve the problem : according to chat GPT the issue was because the URL didn’t use the “Content-Disposition: inline” header, so the PDF viewer (and also my browser, to answer your question) downloaded the file instead of displaying it.
So I had to generate another URL for this file using this updated header, and it worked !
So the issue was coming from the URL, not from the PDF viewer element, you need to have a URL that displays the file instead of downloading it