0

Is there any option to open files from a remote server using HTML?

I am currently using "file" protocol and it is not suported anymore and I am stuck because I can't find a solution to open it using HTML.

This is my current code

<a href="file://\\SERVER\files\file.pdf" target="_blank">Open File</a>

1 Answers1

-1

If you don't define an absolute address, html will search the file in the server where your page is hosted.

 //It means that there is a folder named images on the same location of your html page.
 <a href="/images/myFile.jpg">

 //It means that there is a folder in the parent folder of your html page named images on the same location of your html page.
 <a href="../images/myFile.jpg">

Or you can define an absolute address to download or open your file :

  <a href="http://yourdomain.com/images/myFile.jpg">
Coskun Ozogul
  • 2,389
  • 1
  • 20
  • 32
  • Please say why downvote if not, downvoting doesn't have any meaning. I believe that there are some people who downvote for downvoting only. – Coskun Ozogul Jul 25 '18 at 10:09