title: AngularFire storage listAll build array of promises and forkjoin
body: <p>I'm looking for a hand with creating an array of promises and executing them all with RXJS forkjoin to build a result set.</p>
  <p>I'm using AngularFire's storage module to return all the uploaded files in a given location like so:</p>
  <pre class="lang-js prettyprint-override"><code>  getFileList(folderTree: string, folderName: string) {
      const filePath = folderTree + '/' + folderName;
      const fileRef = this.storage.ref(filePath);
      return fileRef.listAll();
    }
  </code></pre>
  <p>Subscribing to the above like so:</p>
  <pre class="lang-js prettyprint-override"><code>    this.filesService
        .getFileList(this.folderTree, this.folderName)
        .subscribe((result) =&gt; {
          //do stuff
        });
  </code></pre>
  <p>The result of this is a ListResultCompat object that contains an array called 'items' containing ReferenceCompat objects. Each ReferenceCompat object has a method available called 'getDownloadURL' which returns a promise that resolves with a URL.
  I want to make these promises into observables and then forkjoin them to create a final array of the download URLs but the ordinary way of converting to observables with RXJS 'of' is not behaving as I'd expect. Clearly I'm missing something.</p>
  <p>If I do the following:</p>
  <pre class="lang-js prettyprint-override"><code>    this.filesService
        .getFileList(this.folderTree, this.folderName)
        .subscribe((result) =&gt; {
          this.files = result.items.map((file) =&gt; of(file.getDownloadURL()));
          //do stuff
        });
  </code></pre>
  <p>The above produces an array of observables as might be expected, however when I forkjoin them, they do not resolve as I'd hoped. Executing this:</p>
  <pre class="lang-js prettyprint-override"><code>    this.filesService
        .getFileList(this.folderTree, this.folderName)
        .subscribe((result) =&gt; {
          this.files = result.items.map((file) =&gt; of(file.getDownloadURL()));
  
          forkJoin(this.files).subscribe((data) =&gt; {
            //want data to be the resolved promises so I can map out the URLs
          });
        });
  </code></pre>
  <p>Results in an array of ZoneAwarePromise objects which are resolving with a property called '__zone_symbol__value' that contains the URL I'm looking for, however I want the promises to be resolved as part of the forkjoin and just be able to map out the URL value.</p>
  <p>Just not sure what step I'm missing here.</p>