title: failed, zip file Download via axios from vuejs
body: <p>I have a problem with .zip file download in Vue.js. here is my code.</p>
  <pre><code>if (response) {
                      let fileName = response.headers[&quot;x-suggested-filename&quot;]
                      var fileUrl = window.URL.createObjectURL(new Blob([response.data], {type: &quot;application/zip&quot;}));
                      var fileLink = document.createElement(&quot;a&quot;);
                      fileLink.href = fileUrl;
                      fileLink.setAttribute(&quot;download&quot;, fileName);
                      document.body.appendChild(fileLink);
                      fileLink.click();
                  } else {
                      this.$notify.error({
                          title:    &quot;Request failed&quot;,
                          message:  &quot;No response received. &quot;,
                          duration: 0,
                      });
                  }
  </code></pre>
  <p><strong>Here is my response header</strong></p>
  <p><a href="https://i.stack.imgur.com/nk9LW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nk9LW.png" alt="Vue.js" /></a></p>
  <p><strong>I downloaded the file but it doesn't work.</strong></p>
  <p><a href="https://i.stack.imgur.com/o3C09.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o3C09.png" alt="I've archive Utility fail." /></a></p>
  <p><strong>but link it's work, it means, backend site has no problem.
  how can I fix this bug ?</strong></p>
  <p><strong>and here is my code from server.</strong></p>
  <pre><code>public function export(array $params)
  {
      if (!$this-&gt;load($params, '') || !$this-&gt;validate()) {
          throw new BadRequestHttpException();
      }
  
      $exporter = new ProfileExporter($this-&gt;format);
      $zipFile = new ZipFile();
  
      $exporter-&gt;exportToZipFile($zipFile, $this-&gt;profileId, $params);
      $fileName = 'df-profile-data-export-' . \Yii::$app-&gt;formatter-&gt;asDate('now', 'yyyy-MM-dd') . '.' .
          $this-&gt;getFileExtension();
  
      $stream = fopen('php://memory', 'w+');
      $zipFile-&gt;writeToStream($stream);
      \Yii::$app-&gt;response-&gt;headers-&gt;add('X-Suggested-Filename', $fileName);
  
      \Yii::$app-&gt;response-&gt;sendStreamAsFile($stream, $fileName, [
          'mimeType' =&gt; 'application/zip',
      ]);
  }
  </code></pre>