How to allow-file-access-from-files in Chrome?

梦想与她 提交于 2019-12-24 05:31:11

问题


I am using Chrome to test some of my WebGL texture programs. According to the book 'WebGL Programming Guide', if I need to access files from my local disk, I should add the option --allow-file-access-from-files to Chrome.

How do I do that?


回答1:


The short answer is DON'T

Open up a shell/terminal/command line and type

cd path/to/htmlfiles
python -m SimpleHTTPServer

Then in your browser to go

http://localhost:8000

If you find it's too slow consider this solution

The reason you don't want to allow file access is allowing it can be used to steal data from your machine. For example, you go to a site and download some webpage. You then view that page locally. With file access on that locally run page can now access all your files AND upload them to a server.



来源:https://stackoverflow.com/questions/21507918/how-to-allow-file-access-from-files-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!