Chrome扩展程序HTML文件系统访问 [英] Chrome Extension HTML Filesystem Access

查看:496
本文介绍了Chrome扩展程序HTML文件系统访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有网页链接,例如(http://www.website.com/files/info .pdf)和配置设置存储用户所需的路径(默认为下载目录,但他们可以改变它。

我读的一切都意味着这个功能现在存在,但我不知道该怎么做。



谢谢 不允许您直接写入文件系统。它提供了一个API 它允许你访问一个沙盒环境,但不允许你访问任何东西。



Firefox允许通过 XPCOM组件,但用户必须通过about:config启用访问(不能记住密钥,但我会看,无线如果我再次找到它,我会编辑)。

I am looking to save a file to a local path.

I have the weblink for example (http://www.website.com/files/info.pdf) and a config setting storing the users desired path (defaulted to download directory, but they can change it.

Everything I am reading implies this functionality now exist but I cannot figure out how to do it.

Thanks

解决方案

Chrome doesn't allow you to write directly to the filesystem. It provides an API that gives you access to a sandboxed environment, but doesn't allow you to access anything outside of that.

Firefox allows filesystem read/write access through XPCOM components, but users must enable access through about:config (can't remember the key offhand, but I'll look and will edit if I find it again).

这篇关于Chrome扩展程序HTML文件系统访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆