I'm building a react native app with firebase storage and i'm trying to 1) store the image in storage, 2) retrieve downloadURL, 3) set the downloadURL string in firebase for access via the database
storage().ref('users').child(userKey + '/profileImage').put(image.path).then(() => {
storage().ref('users').child(userKey + '/profileImage').getDownloadURL().then(image => {
setProfileImage(image)
firestore().collection('users').doc(userKey).set({
profileImage: image
}).catch((e) => console.log('uploading image error1 => ', e));
}).catch((e) => console.log('uploading image error2 => ', e));
}).catch((e) => console.log('uploading image error3 => ', e));
