i am building react-native app.
i am using react-native-image-picker for uploading images from library and camera roll etc
/9j/4AAQSkZJRgABAQAASABIAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAAB...........etc
return (dispatch) => {
dispatch({ type: HOME_PHOTO_URL_REQUEST });
firebase.storage()
.ref('new')
.child(imageRef + new Date())
// .put(blob, { contentType: 'image/jpg' })
.putString(imagedata, 'base64', {contentType:'image/jpg'})
.then((snapshot) => {
const url = snapshot.metadata.downloadURLs[0];
// const url = snapshot.metadata.downloadURLs;
console.log('urls:', snapshot);
dispatch({ type: HOME_PHOTO_URL_SUCCESS, payload: url });
})
.catch((error) => {
dispatch({ type: HOME_PHOTO_URL_FAIL });
});
};
the upload is successfull and i get a url back from firebase storage but it does not show any images