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

前端 未结 11 1842
我寻月下人不归
我寻月下人不归 2020-11-21 23:12

I have the same situation with HERE

And to solve this problem I have to launch html file using Chrome at \"--allow-file-access-from-files\" mode. I tried next steps

11条回答
  •  没有蜡笔的小新
    2020-11-22 00:04

    Depending on the file which will be put into filesystem, as long as that file is not a malware, then that would be safe.

    But don't worry to write/read file(s) to File System directory, cause you can tighten that directory security (include it's inheritance) by give a proper access right and security restriction. eg: read/write/modify.

    By default, File System, Local Storage, and Storage directory are located on "\Users[Current User]\AppData\Local\Google\Chrome\User Data\Default" directory.

    However you can customize it by using "--user-data-dir" flag.

    And this is a sample:

    "C:\Program Files (x86)\Google\Application\chrome.exe" --user-data-dir="C:\Chrome_Data\OO7" --allow-file-access-from-files
    

    Hope this helps anyone.

提交回复
热议问题