Open Local Files(File://) Using Chrome

Open local files(file://) using Chrome

You can't access to files outside your server or "SandBox", sandbox include the files that user push to the browser or to your server.

If the access from browser to a pc files from web pages was possible, it would be a security problem.

How to launch html using Chrome at --allow-file-access-from-files mode?

Search for the path of your Chrome executable and then, on your cmd, try :

> "C:\PathTo\Chrome.exe" --allow-file-access-from-files

Source

EDIT :
As I see on your question, don't forget that Windows is a little bit similar to Unix, so when you type "chrome ...", cmd will search for Chrome in the PATH, but in general the Chrome folder isn't on the PATH. Also, you don't specify an extension for your executable... So if you move to Chrome's folder, this command will probably work too :

> .\chrome.exe --allow-file-access-from-files

How to allow google-chrome to open a local html file?

This has been disabled on purpose - security. You can directly open file via file:/// directive, but not via links.

The only way I found out is to install a plugin called Enable local file links. If you want to check source code to be sure you can do that at its github page.

It will enable you opening a local file when clicking on a shortcut.

Cannot open local file - Chrome: Not allowed to load local resource

We use Chrome a lot in the classroom and it is a must to working with local files.

What we have been using is "Web Server for Chrome". You start it up, choose the folder wishing to work with and go to URL (like 127.0.0.1:port you chose)

It is a simple server and cannot use PHP but for simple work, might be your solution:

https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb

How to open local file from browser?

You can only open some types of files in browsers, like html css js and mp4, otherwise the browser will want to download it. Also remember that browsers replace spaces with %20. I recommend right clicking the file and opening it with chrome then copy that link and using it.

You can open files that are local as long as it is a file that is on the file that is trying to open another file is local.



Related Topics



Leave a reply



Submit