【发布时间】:2018-12-07 14:55:40
【问题描述】:
在 javascript 中,我从数组中创建一个 blob,如下所示:
const a = new Blob([[1,2,3]]);
当我尝试像这样保存这个 blob 时:
this.afs.collection('events').doc(event.getID()).set({data: new Blob([[1,2,3]])}).then((some) => {
debugger;
})
我得到一个错误:
使用无效数据调用 DocumentReference.set()。不支持的字段值:自定义 Blob 对象(在字段数据中找到)
如何通过 JS 将 blob 保存到 Firestore?
【问题讨论】:
标签: javascript firebase google-cloud-firestore