我正在尝试将数据上传到应用程序的存储桶,但是该行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>
我还在网上尝试了一些解决方案,并进行了检查:
到现在为止,我真的不知道还能尝试什么,并且不胜感激您可以提供的任何帮助!
事实证明,由Google Web-starter-kit提供的Polymerfire版本不是最新版本。到我发现时,我已经使用了firebase主页上提供的firebase初始化代码段,因此不再需要该元素。现在一切正常。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句