但它已经全部上传到我的Firebase存储中,但是我无法通过配置文件创建新数据库
myfire.service.ts
handleImageUpload(data){
const user = this.user.getProfile();
const newPersonalPostKey =
firebase.database().ref().child('myposts/').push().key;
const personalPostDetails = {
fileUrl: data.fileUrl,
name: data.fileName,
creationDate: new Date().toString()
};
const updates = {};
updates['/myposts/' + user.uid + "/" + newPersonalPostKey] = personalPostDetails;
return firebase.database().ref().update(updates);
}
post.component.ts
this.myFire.handleImageUpload(data);