How to retrieve images from my firebase project as an array
I would recommend that whenever you store images to Firebase you keep track of the reference using the DB.
In this tutorial I explained the concept of connecting both Storage and Database of Firebase for this!
But if you already store your images as base64 inside the firebase database you should be able to pull them in using the regular queries and then displaying them with an image tag!
As far as I understand it, firebase doesn’t save ‘Arrays’.
Firebase databse is like a json file.
yourArray
- key1: entry1
- key2: entry2
- key3: entry3
it’s more structured like this…
Hi, @adeadavid
Try Below code
import firebase from 'firebase';
export class ImagesProvider {
firestore = firebase.storage();
constructor(){}
getAllIomage(){
return new Promise((resolve, reject) => {
this.firestore.ref('/picmsgs').child(firebase.auth().currentUser.uid).getDownloadURL().then((url) => {
console.log(url)
})
})
}
Thanks,