Chrome Extension HTML Filesystem Access

耗尽温柔 提交于 2020-01-10 02:16:09

问题


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


回答1:


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).



来源:https://stackoverflow.com/questions/8218890/chrome-extension-html-filesystem-access

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