It is not allowed to load a local resource embedded pdf into an object

I need to open pdf on my web page, the problem is that I am getting files from another server, so I tried using the <object> element with url in the PDF file, but that did not work. So instead, I first upload the pdf file to my server, and then I tried to use

 <object alt="pdf" border="0" data="d:/WEB/ASP/soubory/Download/189005864.pdf" type="application/pdf" width="100%" height="100%"></object> 

But I get an error. Chrome says

Not allowed to load local resource

and in IE

Access is denied

So, I checked how the files that I download are somehow limited, but they are inactive, and even if I correctly touch the link in my source code and select the option “Open in a new tab”, the browser will open the pdf file in a new way in a new tab. So, any ideas what might be wrong?

thanks

+4
source share
1 answer

You do not have the right to do this, you need a virtual path, not a physical one ...

Try with http://[Your server]/directory/yourPDF.pdf as the src of your object

+7
source

All Articles