0

https://www.youtube.com/watch?v=KkZckepfm2Q

is a tutorial on blob fetch for image uploads to Firebase storage. I did this exactly like he did and mine doesn't work... Please help.

import * as firebase from 'firebase'


export let uploadImage = async (uri, imageName) => {  
    const resp = await fetch(uri);  //network [TypeError: Network request failed]
    console.log('resp:',resp)
    const blob = await resp.blob();    
    console.log('blob:',blob)
    let ref = firebase.storage().ref().child('eventapp/' + imageName)
    return ref.put(blob)
}
Onur A.
  • 2,938
  • 3
  • 20
  • 35

0 Answers0