【发布时间】:2019-03-07 03:51:45
【问题描述】:
我完全是 Firebase 的业余爱好者。我的短期目标是从我上传到 Firebase 的文本文件中读取数据。这是代码(从文档复制粘贴):
storageRef.child('images/stars.jpg').getDownloadURL().then(function (url) {
var xhr = new XMLHttpRequest();
xhr.responseType = 'blob';
xhr.onload = function(event) {
var blob = xhr.response;
};
xhr.open('GET', (/*here I put the url of the file*/));
xhr.send();
});
我从这里开始不和。如何阅读此文件并将文本复制到我的页面中?到目前为止我的代码是否正确?
谢谢。
【问题讨论】:
-
您找到解决问题的方法了吗?我想做类似的事情。
-
@Spurious 我还没有找到解决方案。