I am on Mac. I use Safari or Chrome.
I want to make a flask app (python) to search in PDF Files and show the result in a html file - template, with links to the PDF Files.
The problem is that when I render the HTML file, the links to the local files (pdf) don't work. It gives a 404 error. If a hover over the links it shows that the link points to http://localhost:8888/filepath/file and not to path/file.
I have tried to write the link like as <a href="file:///Users/lucian/Downloads/search/High%20voltage.pdf">something</a> but it is still not working.
If I put the link in an HTML file (not rendered) it works just fine. Also, if I click the link from Visual Code, it opens the file.
(I tried with tornado web framework but I've got the same result. I have tried to deactivate restrictions for local files in browser - same).
Could you please help?
Thank you in advance.