I try create a list of archives which is in a Firebase Storate using a listAll of Firebase 9, and i follow the documentation, but dons't work.
always gives this error: [storage/unknown]. apparently couldn't find the path
But, if i use a path to download a single archive using getDownloadURL, I can do it without problems.
My listAll example:
const storage = getStorage()
const listRef = ref(storage, 'archives')
listAll(listRef)
.then((res) => {
console.log(res)
}).catch((error) => {
console.log(error.code)
})
My getDownloadURL for comparation:
const storage = getStorage()
const listRef = ref(storage, 'archives/dummy.pdf')
getDownloadURL(listRef).then(res => {
console.log(res)
}).catch((error) => {
console.log(error.code)
})
what am i doing wrong?