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 apply --allow-file-access-from-files with Chrome by default on windows?
It sounds like you are on windows. You can write a one-line batch script chrome-file-access.bat
that runs
c:\path\to\chrome.exe --allow-file-access-from-files %1
and then associate the .xml file type with the batch file.
Instructions for associating file types on windows in case you need it:
https://www.digitaltrends.com/computing/how-to-set-default-programs-and-file-types-in-windows-10/
You can use a similar approach on other OS's as well.
Chrome allow file access from files no longer working (was using to see WebGL/three.js files)?
The answer I came up with was to use Firefox instead of Chrome changing the security policy as detailed in https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally
Not a perfect answer but with a deadline looming it's the best workable answer for me right now as trying different variations of Chrome, trying Wamp and also Mongoose didn't work. If I had more time I would work out how to use Python or probably node.js as I've seen it mentioned a number of times as being the faster option.
What gman stated is true, using the Chrome flag (and changing Firefox's security policy) does create a big security risk. But only if you use that shortcut (and it's tabs etc.) for anything other than accessing your own local files. I've been scrupulous about not using it for the internet but don't use this method if you can't be strict with yourself.
Ideally I'd recommend beginning any project with node.js.
Can I use --allow-file-access-from-files when starting chrome app?
I finally figured out that --allow-file-access-from-files
does not work at all in my case.
I started coding using fileSystem
and made something like the recomended in this question, following the main example. Now I am able to work with files in a directory asking the user to choose it only one time.
Related Topics
Capture HTML Canvas as Gif/Jpg/Png/Pdf
Twitter Bootstrap Tabs: Go to Specific Tab on Page Reload or Hyperlink
How to Implement "Select All" Check Box in Html
How to Get the Entire Document HTML as a String
Browser/Html Force Download of Image from Src="Data:Image/Jpeg;Base64..."
How to Detect Keypresses in JavaScript
Does Html5/Canvas Support Double Buffering
Changing Website Favicon Dynamically
Full-Screen Iframe With a Height of 100%
How to Get Js Variable to Retain Value After Page Refresh
How to Get a File or Blob from an Object Url
Double Quote in JavaScript String