angular - 使用 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();
}
}
解决方案
最后,我将链接文档保存在我的数据库中以重试信息。
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);
}
推荐阅读
- javascript - 如何全屏模式自定义视频播放器并在全屏打开时向下滚动
- mysql - 什么是插入查询取决于同一张表中的先前数据?
- javascript - 在javascript中根据条件为图像设置标题
- pdf - 当我缩小时 PDFBox 生成如此黑线
- react-native - 使用 react-native-view-pdf 显示空白视图
- qt - 通过 Pointer 访问 QAbstractItemModel 的项目在多次读取后变为 NULL
- angular - 为什么警告框显示两次?
- iis - 基于查询字符串值的 IIS 重写
- excel - 在不同的工作表中插入新行并粘贴值
- sql - 创建语句中缺少右括号