I have a list of contacts, and each of them has a profile photo, which is stored in the Firebase repository. The official way to get the images would be to get the URL using the Firebase storage SDK and set it as src in the img element.
firebaseApp.storage().ref("profilePhotos/" + officeId + ".jpg").getDownloadURL().then(function (url) {
this.photoUrl = url;
}.bind(this)).catch(function (error) {
console.log("Photo error");
});
This is rather cumbersome when I have to upload multiple files (as in my contact list). Is the file url above static? Can I save it in the database in my profile and use it directly?
thank
source
share