admin管理员组文章数量:1327092
I am developing an extension for the chrome browser. I use the KangoExtensions framework. The extension is written in JavaScript. I want to read the content of a file, which is located on the local filesystem. What is the easiest way to implement this?
I am developing an extension for the chrome browser. I use the KangoExtensions framework. The extension is written in JavaScript. I want to read the content of a file, which is located on the local filesystem. What is the easiest way to implement this?
Share Improve this question asked Aug 4, 2016 at 15:02 RonquamRonquam 1452 silver badges13 bronze badges 2-
local file system
is like ad:\
folder or my home directory on linux? Nah, an extension can't see them. You can only have a standard HTML file-upload button or drag'n'drop support. See also Chrome extensions with text files – woxxom Commented Aug 4, 2016 at 15:45 - 1 Possible duplicate of Chrome extensions with text files – Haibara Ai Commented Aug 5, 2016 at 0:08
1 Answer
Reset to default 8If you already know the file's path in the filesystem you just need to add a permission to file://*
in your manifest file and make a GET XMLHttpRequest to the url file://{filepath}
.
本文标签: javascriptRead content of a local file with chrome extensionStack Overflow
版权声明:本文标题:javascript - Read content of a local file with chrome extension - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742207350a2433063.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论