使用 angular5 中的 jsstore 将图像存储在 indexedDB 中
Store images in indexedDB using jsstore in angular5
我需要使用 jsstore.[=10 将 图像存储为 indexeddb 中的 blob =]
可能吗?如果是,我怎样才能在 angular5 中实现这个?
是的,这是可能的,因为 JsStore 的构建方式可以存储任何 JS 值(原始值和对象)。
在创建用于存储 Blob 对象的 table 模式时,您可以使用 object
数据类型,并可以对其执行必要的操作。
看看 Image blob and its live demo 上的这个 github 项目。 它肯定会让您了解它是如何工作的,您可以更改代码相应地为您的 Angular 5 个项目。
希望对您有所帮助。
我需要使用 jsstore.[=10 将 图像存储为 indexeddb 中的 blob =]
可能吗?如果是,我怎样才能在 angular5 中实现这个?
是的,这是可能的,因为 JsStore 的构建方式可以存储任何 JS 值(原始值和对象)。
在创建用于存储 Blob 对象的 table 模式时,您可以使用 object
数据类型,并可以对其执行必要的操作。
看看 Image blob and its live demo 上的这个 github 项目。 它肯定会让您了解它是如何工作的,您可以更改代码相应地为您的 Angular 5 个项目。
希望对您有所帮助。