Link to file on different server

前端 未结 2 890
孤街浪徒
孤街浪徒 2021-01-26 17:56

I am working on a invoice report with my companies intranet. I would like to be able to link the invoice number to the actual invoice. My problem is that the file resides on a d

2条回答
  •  死守一世寂寞
    2021-01-26 18:27

    What you are doing is disabled by design. This sort of link to a local file will work in some browsers as long as the HTML is also called from a local file (ie file:///pageContainingLink). If not, it's a security vulnerability. It won't work at all in webkit based browsers.

    See nchor Link to Local File? (DEAD LINK not working in FireFox but in IE)

    And Cross-browser link to file on local system

    If you want to get this to work, you'll need the other server to be a web-server too so that you can link to http://intranet2/fileYouWant.pdf

提交回复
热议问题