Can't log path of uploaded images outside of foreach loop
I simply want to get download urls from firestorage and push it to empty array. In handleSubmit I try this but it logs empty array.. if I try it inside it logs correctly let images = []; thumbnail.forEach(async (file) => { const uploadPath = `property/${user.uid}/${file.name}`; const imgRef = ref(storage, uploadPath); await uploadBytes(imgRef, file); images.push(await getDownloadURL(imgRef));… Read More Can't log path of uploaded images outside of foreach loop