java - How to serve local files via browser -
i'm making intranet page users put in information (text). application take text , go through files on shared drive webserver has access to. based on text , logic it'll find file matches.
now have full absolute file path of matched file, i'd users able download file page well. however, since file doesn't exist in application can't serve it.
all have network share like: \\somenetwork\share\filename.pdf
is there way can let users download file (with above path) intranet page?
i've tried:
<a href="\\somenetwork\share\filename.pdf">
not work. tried prepending file://
link nothing. not open file or give option download.
ps: understand should ideally script on command line. i'm trying turn command line script intranet page.
this works in chrome , ie. txt file on shared drive (that have access to), opens file in browser.
<a href="file://\\server\d$\temp\clipboard.txt">test</a>
you have ensure user has access shared drive work. otherwise you'll need host file somewhere (e.g. via webserver).
Comments
Post a Comment