title: Promise.all() resolves immediately
body: <p>I'm trying to take some action after upload completion of multiple images, using <a href="http://bluebirdjs.com/docs/api/promise.all.html" rel="nofollow noreferrer">Promise.all</a>.</p>
  
  <p>However, the code after <code>then</code> runs before the code being dispatched.</p>
  
  <p>What am I confusing here?</p>
  
  <pre><code>  submit_all_images({ dispatch, rootState }) {
      const imageFileArray = rootState.imageStore.imageFileArray 
      var promiseArray = []
  
      for ( var imageFile of imageFileArray ) {
        promiseArray.push(dispatch('get_signed_request', imageFile))
      }
  
      Promise.all(promiseArray)
        .then(results =&gt; {
          console.log("finished with results: " + results)
          return dispatch('submit_entire_form')
        });
    },
    get_signed_request ({ dispatch, commit, state }, imgFile) {
      const requestObject = {imageName: imgFile.name, imageType: `${imgFile.type}`}
      axios.post('http://localhost:3000/sign-s3', requestObject)
      .then(response =&gt; {
          if (response.body.signedRequest &amp;&amp; response.body.awsImageUrl) {
            const signedRequest = response.body.signedRequest
            const awsImageUrl = response.body.awsImageUrl
            dispatch('upload_file', { imgFile, signedRequest, awsImageUrl })
          } else {
            alert('Could not get signed URL.');
          }
      }, error =&gt; {
        console.log("ERROR: " + error)
      })
    },
  
    upload_file ({ dispatch, commit, state}, { imgFile, signedRequest, awsImageUrl }) {
      axios.put(signedRequest, imgFile, {
        headers: {'Content-Type': imgFile.type}
      }).then(response =&gt; {
        console.log('finished uploading file: ' + imgFile.name )
        commit(types.UPDATE_LICENSE_IMG_URLS, awsImageUrl)
      }, error =&gt; {
        alert("fail")
        console.log(error)
      })
    },
  </code></pre>