Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable local file system read write access from Google chrome?

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.

like image 788
SmartSolution Avatar asked Apr 06 '26 08:04

SmartSolution


1 Answers

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

like image 129
sajawikio Avatar answered Apr 08 '26 21:04

sajawikio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!