title: Uploading a file in React redux firebase
body: <p>I'm trying to upload a file to firebase storage but i keep getting this error:</p>
  
  <pre><code>Error: Firebase storage is required to upload files
      at Object.uploadFile (storage.js:63)
      at Object.uploadFile (createFirebaseInstance.js:139)
      at classActions.js:11
  </code></pre>
  
  <p>This is the call:</p>
  
  <pre><code>export const createClass  = (_class) =&gt; {
      return (dispatch, getState, {getFirebase, getFirestore}) =&gt; {
          // Call to DB
          const firestore = getFirestore();
          const firebase = getFirebase();
          firestore.collection('classes').add({
              ..._class,
              createdAt: new Date()
          }).then(() =&gt; {
              console.log(_class.image);
              firebase.uploadFile('imgs', _class.image);
          }).then ( () =&gt; {
              dispatch({
                  type: 'ADD_CLASS',
                  class: _class
              })
          }).catch( (err) =&gt; {
              dispatch({
                  type: 'ADD_CLASS_ERROR',
                  error: err
              });
          });
      }    
  };
  </code></pre>
  
  <p>I know that the image is not void,and the rules for storage in the firebase console are set to public. Also, the folder already exists, just in case. </p>
  
  <pre><code>handleChangeImage = (e) =&gt; {
      this.setState({
        image: e.target.files[0]
      });
    }
  
  
  &lt;input type="file" id="image" onChange={this.handleChangeImage}/&gt;
  </code></pre>
  
  <p>I can't figure out what I could be doing wrong.</p>