title: Content-Disposition: download file automatically
body: <p>The API call to the server is returning a zip file with <code>Content-Disposition</code> in format <code>attachment, &lt;filename&gt;</code>
  I am using FileSaver's saveAs to save the file.</p>
  <pre><code>    this.ajax.raw(requestUrl, {
          dataType: 'binary',
          xhr: () =&gt; {
            const myXhr = $.ajaxSettings.xhr()
            myXhr.responseType = 'blob'
            return myXhr
          }
        }).then((response) =&gt; {
          this.downloadSuccess(response, minTimeString, maxTimeString, downloadCompletedMessage)
        }).catch((e) =&gt; {
          this.downloadError(e)
        })
  
  downloadSuccess (response, minTime, maxTime, downloadCompletedMessage) {
      const filename = (response.jqXHR.getResponseHeader('Content-Disposition').split('&quot;')[1])
      saveAs(response.payload, filename, 'application/zip')
  </code></pre>
  <p>This works fine for small files but fails if the file is more than 2Gb (The file is downloaded successfully but the saved file is of 1Kb only).</p>
  <p>During my research, I saw that browser can download the file without FileSaver if the response has <code>Content-Disposition</code> which is true in my case. But I am not able to figure out how.</p>
  <p>Do I need to use request differently?</p>