获取本地文件内容而不上传
我正在编写一个离线网络应用程序,允许用户选择本地文件,修改它,然后也在本地保存副本。是否可以在没有任何服务器的情况下(我可以上传文件并返回其base64,但它不是离线的)?应用程序只需要在 Google Chrome 上运行,所以也许我应该看看这里?
I'm writing an offline webapp that allows user to select local file, modify it and than saves a copy also locally. Is it possible without any server (I can upload a file and return base64 of it, but it's not much of a offline)? App needs to work only on Google Chrome, so maybe I should look here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
HTML5 文件 API 可能很有用
http://www.html5rocks.com/en/tutorials /文件/dndfiles/
The HTML5 File API might prove usefull
http://www.html5rocks.com/en/tutorials/file/dndfiles/
其中 input 是一个元素
。也适用于可以选择多个文件的输入。
where input is an element
<input type='file'></input>
. Also works for an input that can select multiple files.为了在浏览器中处理文件,我使用 downloadify。为了使其能够与包含“file://”的路径一起使用,您需要允许 downloadify.swf 访问 设置。
To work with files in the browser I use downloadify. In order to make it work with paths containing "file://" you need to allow for downloadify.swf access to the file system on the settings.