How to give local access to Intranet site in chrome

0

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 ??

Ayman

Posted 2014-04-08T13:15:42.717

Reputation: 101

Can you be more specific with local access? Do you want to link to a document, do you want to include images? – LPChip – 2014-04-08T13:20:50.987

both. Generally, to be able to use 'file:///' protocol to link to any file in the domain. – Ayman – 2014-04-08T13:22:31.770

Answers

0

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).

Dave

Posted 2014-04-08T13:15:42.717

Reputation: 24 199

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 – 2014-04-08T14:48:16.680

Sorry, that wasn't clear - From HTML you can't open Windows Explorer. I updated my question – Dave – 2014-04-08T14:49:08.917

Another thing that I mentioned, I already did it in Firefox, you can check this link

– Ayman – 2014-04-08T14:49:26.863

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 – 2014-04-08T14:51:27.947

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 – 2014-04-08T14:54:26.270

0

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.

LPChip

Posted 2014-04-08T13:15:42.717

Reputation: 42 190