Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Local File Access from a Website

  • 1 回覆
  • 4 有這個問題
  • 3 次檢視
  • 最近回覆由 nameany2

more options

Hey guys,

I'm in a bit of a predicament, I need to be able to have my department members click a local file link on the website and have access to a folder on a shared drive. I talked to customer support for my site, and they sent me a link to follow with instruction on how to accomplish this. However, I'm not confident in my ability in doing the change.

Firefox Workaround link The link states to put this code into the prefs.js document:

Mozilla FireFox: You need add the following into your prefs.js:

user_pref("capability.policy.policynames", "localfilelinks"); user_pref("capability.policy.localfilelinks.sites", "http://the website that has the file link"); user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");

After that, it works for links like file:///C:/... file:///Z:/... and file://///host/sharedFile


How would I do that ? What would I alter to fit my needs ? Any help would be amazing!!

Hey guys, I'm in a bit of a predicament, I need to be able to have my department members click a local file link on the website and have access to a folder on a shared drive. I talked to customer support for my site, and they sent me a link to follow with instruction on how to accomplish this. However, I'm not confident in my ability in doing the change. [http://www.websina.com/bugzero/kb/browser-file-url.html Firefox Workaround link] The link states to put this code into the prefs.js document: Mozilla FireFox: You need add the following into your prefs.js: user_pref("capability.policy.policynames", "localfilelinks"); user_pref("capability.policy.localfilelinks.sites", "http://the website that has the file link"); user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess"); After that, it works for links like file:///C:/... file:///Z:/... and file://///host/sharedFile How would I do that ? What would I alter to fit my needs ? Any help would be amazing!!

所有回覆 (1)

more options

I found a very good explanation here. Aternatively, I prefer to keep custom stuff like that in user.js. If you don't have user.js in your Firefox profile directory, just create it using Notepad. Firefox never writes to user.js, you can keep your comments in there (start the comment line with '#') , and it's easy to keep it synchronized between different computers where you use Firefox.