How to display html file stored in local PC from chrome app?

人盡茶涼 提交于 2019-12-24 06:04:57

问题


I want to display a html file stored in local PC in another HTML. How do I do that? I tried using iframes and giving file:/// protocol. It gives me Not allowed to load local resource: error.


回答1:


In a Chrome App, to access local files / folders you need to use the chrome.fileSystem API and get the user to select the file/folder for you (works as access approval that you can retain for later).

You can't use file:/// from a Chrome App.



来源:https://stackoverflow.com/questions/37029737/how-to-display-html-file-stored-in-local-pc-from-chrome-app

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