title: How to store image in firebase storage and save the image url in realtime database
body: <p>I got Undefined Url. Someone know how to solve my problem?</p>
  
  <pre><code>function store(){
      var litrato = this.files[0];
  
      var storageref = firebase.storage().ref('gallery/' + litrato.name);
      var uploadTask = storageref.put(litrato);
      uploadTask.on('state_changed', function(snapshot){
      }, function(error){
      }, function(){
          var downloadURL = uploadTask.snapshot.downloadURL;
          console.log(downloadURL);
      });
  }
  </code></pre>