I'm trying to find a way to open PDF files directly from its location. I know I can use this to open files.
import pdf from './file.pdf
<a href={Pdf} target = "_blank">Open Pdf</a>
But this is not going to work for me, I'm building an item list app with React and Node for a small company I work for, and every new item needs to have a certificate that is in PDF. User needs to be able to add PDF file when creating a new item and open it when needed. They want the app to be live on the internet, but all certificates to be on their local server, so only people that are connected to their network can see them. Is this possible to do?
I was thinking just to save the path to pdf file in the database and then use that path to display it in app. Something like this.
<a href="//10.0.0.246/share/cert/scan/file.pdf" target = "_blank">Open certificate</a>
But I can't make it work right now, even when the file is in the same folder as my app.