Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently developing an Intranet web application. I want the application to access local files in the user's computer or the domain files (hence Intranet).

I managed to give local file access (href for <img> and <a> ) in Firefox in user.js, the problem is with chrome. How to do it ??

share|improve this question
Can you be more specific with local access? Do you want to link to a document, do you want to include images? – LPChip Apr 8 '14 at 13:20
both. Generally, to be able to use 'file:///' protocol to link to any file in the domain. – Ayman Apr 8 '14 at 13:22

Share the directory you want to use and then access it using:

<a href="http://pcname/share/path/file.ext">Description of file</a>

Browsers tend to see "file://" as a security risk and block it. Besides, by using this method, people in your network will be able to access the file.

share|improve this answer

Your question isn't clear - not sure if you're trying to access resource files (such as .css files) or documents like Word processing files or similar. I'm going to assume documents and directories.

The issue is, you can't open directories via Windows Explorer, it's as simple as that as it's a security risk. However, you can open directories in the browser.

This works for Chrome, Firefox and IE

<a href="file://C:\Users\me\Documents\">Open directory</a>

<a href="file://C:\Users\me\Documents\1_011014_135535239_.csv">Open file</a>

If you're still blocked, then you need to give permission by the folder to the relevant groups (or by everyone if safe to do so).

share|improve this answer
The issue is, you can't open directories via Explorer, it's as simple as that as it's a security risk. However, you can open directories in the browser. What did you mean by this ?? – Ayman Apr 8 '14 at 14:48
Sorry, that wasn't clear - From HTML you can't open Windows Explorer. I updated my question – Dave Apr 8 '14 at 14:49
Another thing that I mentioned, I already did it in Firefox, you can check this link – Ayman Apr 8 '14 at 14:49
I think I've now understood the question - you are talking about updating the browsers to allow this? What happens when a new browser comes out? What happens if Firefox decide to retract this functionality? – Dave Apr 8 '14 at 14:51
Currently I am developing for Firefox and Chrome (A company's Intranet). The only thing I need from the browser is to allow the file:/// protocol to access local documents for downloading/reading/... – Ayman Apr 8 '14 at 14:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .