I need to enable local file system read/write access from Google-Chrome using HTML/Javascript code. I am using set of html pages which are stored in local system (ie file://c:/project1/page.html ...).
My current observation is that we can do local file reading operation using FileReader javascript class without making any extra configuration or settings in the browser. But when I tried to write in the local file using some JS code it keeps asking for permission by showing Alert box to the User for every write operation.
So my question is, Is there any way to disable this kind of prompting for file write operation from google-chrome? I've seen that chrome stores browser configuration in master_preferences file and Preferences files located inside chrome installation folder, But couldn't find such kind of entry/record for the same.
Thanks & Regards.
I like to use JQuery.twFile for this purpose. It's great for both reading from local flesystem AND writing to it.
It will not show you any errors or prompts when reading or writing a file.
It may show some other kind of prompts though in Chrome. (Java related prompts)
While using it, in order to prevent Java related prompts I launch Chrome in this manner:
C:\Users\WHATEVER\AppData\Local\Google\Chrome\Application\chrome.exe --allow-outdated-plugins --allow-file-access-from-files
ALSO, be sure to do the following:
Go to URL: chrome://plugins/ Then, under Java, be sure checkbox for "Always Allowed" is checked
来源:https://stackoverflow.com/questions/12257109/how-to-enable-local-file-system-read-write-access-from-google-chrome