Reputation: 113
I am trying to open a file which is on the local disk on firefox using html on a ubuntu machine. But, I am facing file not found error. My code is as follows:
<body>
<a href="/home/abc/workspace/logfile.log">LOG FILE</a>
</body>
I tried using file:/// but still the file is not getting opened.
Upvotes: 4
Views: 12094
Reputation: 16041
Use the file:///
protocol:
file:///home/abc/workspace/logfile.log
It does not work however for security reasons in a general case. You can disable the security check by editing about:config
, or by using an extension, however I would not recommend it.
This is the about:config
key:
security.fileuri.strict_origin_policy
It is true
by default, you can set it to false
.
Upvotes: 12
Reputation: 3447
You cannot access file system using the browser. For obvious security reasons.
Upvotes: -3