Hi guys,
I have a load of files of all different types (Word documents, PDFs, zips, etc) stored in the database.
My client wants it so that when he clicks on a HTML link, it retrieves the specified file
from the database and opens it using the default program for that file type.
Now here's the problem. I can easily retrieve the file from the DB, but I cannot write it to the local directory due to security restrictions on the web server itself. There's another local drive (D:/) that I can write the file to perfectly fine, but most modern browsers prevent you from opening a link like the following:
window.open('file:///D:/Temp/tmp1.docx');
And:
<a href="file:///D:/Temp/tmp1.docx">file link</a>
And for good reason.
So what would be the best way of automatically opening a file like this directly from the DB?
Many thanks in advance.