title: Getting Download URL from Firebase storage in Angular
body: <p>I'm trying to get download URL after uploading my file to firebase storage so far i'm able to upload the file but for the URL i keep getting undefined here is my code :</p>
  
  <pre class="lang-js prettyprint-override"><code>onFileChanged(event) {
  
    const file: File = event.target.files[0];
    const metaData = { 'contentType': file.type };
    const storRef: firebase.storage.Reference = firebase.storage().ref('/MyFolder/' + file.name);
    const uploadTask: firebase.storage.UploadTask = storRef.put(file, metaData);
    console.log('Uploading:' + file.name);
  
    uploadTask.then((uploadSnapshot: firebase.storage.UploadTaskSnapshot) =&gt; {
      const imageUrl = uploadSnapshot.downloadURL;
      console.log('URL:' + imageUrl);
    });
  }
  </code></pre>
  
  <p>any suggestions 
  Thank You</p>