我正在尝试将数据上传到我的应用的存储空间,但是行var uploadRef = firebase.storage().ref();
会导致以下错误:
Firebase Storage: No default bucket found. Did you set the 'storageBucket' property when initializing the app?
然而(我认为)我已经通过将聚合物<firebase-app>
元素放在index.html的主体中来初始化应用程序,如下所示:
<firebase-app
api-key="<my-api-key>"
auth-domain="<my-auth-domain>"
database-url="<my-database-url>"
storageBucket="<my-storageBucket-url>">
</firebase-app>
我还在网上尝试了一些解决方案并检查过:
到目前为止,我真的不知道还有什么可以尝试,并感谢您提供的任何帮助!
答案 0 :(得分:0)
原来,Google web-starter-kit提供的聚合物版本并不是最新版本。当我发现我已经使用了firebase主页上提供的firebase初始化片段时,因此不再需要该元素。 现在一切正常。