首页 > 解决方案 > 使用 angularfire2 从存储中下载列表

问题描述

我可以成功地将文档保存在 firebase 中。

我现在想显示特定存储文件夹中包含的所有文档

但文档仅指定如何获取特定文档:

@Component({
  selector: 'app-root',
  template: `<img [src]="profileUrl | async" />`
})
export class AppComponent {
  profileUrl: Observable<string | null>;
  constructor(private storage: AngularFireStorage) {
     const ref = this.storage.ref('users/davideast.jpg');
     this.profileUrl = ref.getDownloadURL();
  }
}

标签: angularfirebaseangularfire2angularfire5

解决方案


最后,我将链接文档保存在我的数据库中以重试信息。

SaveDoc() {
const Patientid = this.patientid;
    const name = Date.now().toString();
    const newDoc = new Doc(name, Patientid, this.url);
    console.log(this.url);
    this.docsService.CreatePpsDoc(newDoc);
}

推荐阅读