I have a problem with:
href="file://"
Well I want to point a link in html to file, in browser if I write like
file:///K:/filename.pdf
It works to open a file, but if I point it to:
href="http://file:///K:/AmberCRO%20SOP/2011-07-05/SOP-SOP-3.0.pdf"
It doesn't work. link is changed to:
file///K:/AmberCRO%20SOP/2011-07-05/SOP-SOP-3.0.pdf
The colon
after file disappears. Any suggestions as to what to do?
Although the ffile:////.exe used to work (for example - some versions of early html 4) it appears html 5 disallows this. Tested using the following:
<a href="ffile:///<path name>/<filename>.exe" TestLink /a>
<a href="ffile://<path name>/<filename>.exe" TestLink /a>
<a href="ffile:/<path name>/<filename>.exe" TestLink /a>
<a href="ffile:<path name>/<filename>.exe" TestLink /a>
<a href="ffile://///<path name>/<filename>.exe" TestLink /a>
<a href="file://<path name>/<filename>.exe" TestLink /a>
<a href="file:/<path name>/<filename>.exe" TestLink /a>
<a href="file:<path name>/<filename>.exe" TestLink /a>
<a href="ffile://///<path name>/<filename>.exe" TestLink /a>
as well as ... 1/ substituted the "ffile" with just "file" 2/ all the above variations with the http:// prefixed before the ffile or file.
The best I could see was there is a possibility that if one wanted to open (edit) or save the file, it could be accomplished. However, the exec file would not execute otherwise.
%20
is the space between AmberCRO SOP.
Try -
href="http://file:///K:/AmberCRO SOP/2011-07-05/SOP-SOP-3.0.pdf"
Or rename the folder as AmberCRO-SOP and write it as -
href="http://file:///K:/AmberCRO-SOP/2011-07-05/SOP-SOP-3.0.pdf"
Share your folder for "everyone" or some specific group and try this:
<a href="file://YOURSERVERNAME/AmberCRO%20SOP/2011-07-05/SOP-SOP-3.0.pdf"> Download PDF </a>
_x000D_
Source: Stackoverflow.com