IndexedDB怎么存储File对象


我的一个chrome应用需要把file对象存储在IndexedDB,可是直接插进去提示复制错误,google了一下貌似Chrome下的IndexdbDB不支持存储file和blob对象,怎么才能实现呢

indexeddb chrome chrome-web-app JavaScript

水无月清姬 9 years, 11 months ago

Chrome可以考虑FileSystem API替代: https://developer.chrome.com/apps/fileSystem

或者用老办法,将数据base64 encode之后作为字符串存储。

eclium answered 9 years, 11 months ago

Your Answer