我想知道是否可以将从存储中获取的url保存到数据库中,并在每次需要图像时检索链接?现在,每次需要获取图像时,我都会调用以下函数,它很慢。我只是担心链接可能会根据用户所在的位置和时间而改变?
storage.ref(thisEvent.eventImgInReference).getDownloadURL().then(function (url) {
//here I just add the image url
thisEvent.eventImgLink=url;
//
$scope.$apply();
}).catch(function (error) {
});
仅当您在Firebase控制台中撤消下载令牌时,下载URL才会更改,因此将它们存储在数据库中完全可以。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句