title: How to upload image to firebase in expo react native
body: <p>I used RNFirebase before to upload image to firebase.
  At that time, I used this code : </p>
  
  <pre><code>firebase
          .storage()
                .ref()
                .child(`posts/${fileName}`)
                .putFile(postImage.uri)
                .then((value) =&gt; {
                  console.log('Put file response :', value);
  </code></pre>
  
  <p>In here,</p>
  
  <pre><code>let result = await ImagePicker.launchImageLibraryAsync({
        mediaTypes: ImagePicker.MediaTypeOptions.All,
        // allowsEditing: true,
        // aspect: [4, 3],
        quality: 1
      });
  
      console.log(result);
  
      if (!result.cancelled) {
        this.setState({ imageData: result });
      }
  
  
  
  postImage  = result.uri
  </code></pre>
  
  <p>That is postImage is the url of image.
  However, I have to change the code using firebase and have to upload image to firebase storage and database.
  So I used this code : </p>
  
  <pre><code>firebase
          .storage()
                .ref()
                .child(`posts/${fileName}`)
                .put(postImage.uri)
                .then((value) =&gt; {
                  console.log('Put file response :', value);
  </code></pre>
  
  <p>But the result has the errors on the screen.
  It returns <code>[object object]</code> on the screen.
  <a href="https://i.stack.imgur.com/wZi3A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wZi3A.png" alt="enter image description here"></a>
  So I looked on the docs of firebase and the function <code>put</code>must have the data like this : 
  <code>put(data | blob)</code>
  But I can't understand this.
  How can do I this?
  Let me know how to fix it~
  Thanks and best wishes. </p>