可以使用 HTML5 本地存储来存储文件吗?如果不是,怎么办? [英] Can you use HTML5 local storage to store a file? If not, how?

查看:19
本文介绍了可以使用 HTML5 本地存储来存储文件吗?如果不是,怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过浏览器机制(插件是可接受的解决方案)在用户计算机上缓存/管理许多大文件(视频).据我所知,本地存储是关于数据库类型的数据,而不是文件.

How would one go about caching / managing many large files (videos) on a user's computer via browser mechanisms (plugins are acceptable solutions). From what I can tell, local storage is about database type data, not files.

推荐答案

FileSystem API[1,2] 将是您未来的最佳选择,在某一点上它非常前沿.然而,它已被 w3c 放弃.来自他们自己的文档:

The FileSystem API[1,2] was going to be your best bet going forward, at one point it was very much bleeding edge. However it has been been abandoned by w3c. From their own documentation:

本文档的工作已停止,不应被引用或用作实施的基础.

Work on this document has been discontinued and it should not be referenced or used as a basis for implementation.

  1. http://dev.w3.org/2009/dap/文件系统/pub/文件系统/
  2. http://www.html5rocks.com/tutorials/file/filesystem/

这篇关于可以使用 HTML5 本地存储来存储文件吗?如果不是,怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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