javascript - 在indexedDB中使用JavaScript保存大文件(> 25 GB)

标签 javascript jquery indexeddb large-files

我尝试在indexedDB中保存大文件,但当我使用大于500MB的文件时,我的chrome停止响应。我的目标是在 indexedDB 中存储 100GB 文件,并将其检索回来并下载相同的文件。

所以基本上我需要使用indexedDB作为大文件存储。

请帮助我实现这一目标。

最佳答案

看起来 IndexedDB 的限制不允许您存储那么多数据。

如果您通读 storage limits看来可以存储的最大数据量是 2 GB。

此处引用的内容如下:

There's also another limit called group limit — this is defined as 20% of the global limit, but it has a minimum of 10 MB and a maximum of 2 GB. Each origin is part of a group (group of origins). There's one group for each eTLD+1 domain. For example:

  • mozilla.org — group1, origin1
  • www.mozilla.org — group1, origin2
  • joe.blogs.mozilla.org — group1, origin3
  • firefox.com — group2, origin4

Chrome似乎使用了其他限制,从中您可以找到更多信息here

引用以下信息

Prior to M66, this was 10% of total storage instead of a fixed value on all devices. Now the minimum of a fixed value (2GB) and 10% is used to limit the reserve on devices with plenty of storage, but scale down for devices with extremely limited storage.

关于javascript - 在indexedDB中使用JavaScript保存大文件(> 25 GB),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63729486/

相关文章:

javascript - 有没有办法确定 execCommand ('undo' ) 是否可执行? [JavaScript]

javascript - 使用 Nodejs Express 调用 fetch() 后重定向

jquery - 使用 Jquery,从文本字段中提取文本并将其放入无序列表 onClick

javascript - 将 jQuery 验证器的 valid() 或 element() 方法与远程方法一起使用

javascript - 在 IndexedDB 和 AngularJS 上查询 MomentJS 日期 - 日期与字符串

PHP session 页面刷新不起作用

javascript - eslint Warning Unexpected unnamed async function ,无论如何要摆脱它?

javascript - 如何在打印前动态更改文档的方向

html - 索引数据库性能

javascript - Service Worker 从另一个 Worker 获取数据后响应“获取”