I have a storage on firestore that has a folder with images called barber. I want to list all the urls in this folder using getDownloadUrl method below. The console log return storage object not found. Can someone tell me what i do wrong,please?
const mypicks = getRef(storage,'barber/')
getDownloadURL(mypicks)
.then((url) => {
// `url` is the download URL for 'images/stars.jpg'
// This can be downloaded directly:
// const xhr = new XMLHttpRequest();
// xhr.responseType = 'blob';
// xhr.onload = (event) => {
// const blob = xhr.response;
// };
// xhr.open('GET', url);
// xhr.send();
// Or inserted into an <img> element
console.log('url',url)
})
.catch((error) => {
// Handle any errors
console.log(error)
});