I’ve been trying to upload an image using firebase, React Native and react-native-image-picker.
The data I get from the image picker is in base64 format and I don’t know how to actually upload it to my firebase storage because when I execute the following line :
var imageRef = storageRef.child("images/usersImages/" + global.userID + ".jpg")
uploadTask = imageRef.put(global.imageToUpload)
Nothing is executed after. Even if I put an alert right after.
My « file » variable contains that : 'data:image/jpeg;base64,' + response.data
I’ve also tried to put only the response.data but it’s not working.