title: How do i get a zip file out of an xhr response?
body: <p>I'm not very practiced in using XMLHttpRequests, but I am working on a drag and drop file converter that takes a zip file and returns one in response. Most of it is working, but I'm not sure how to pick the zip file out of the response. Here's where I'm at:</p>
  
  <pre><code>dropZone[0].ondrop = function(event) {
      // Stop the browser from opening the file in the window
      event.preventDefault();
      dropZone.removeClass('hover');
  
      // Get the file and the file reader
      var file = event.dataTransfer.files[0];
  
      // Send the file
      var xhr = new XMLHttpRequest();
      //    xhr.upload.addEventListener('progress', uploadProgress, false);
      xhr.onreadystatechange = function(response) {
          if (event.target.readyState == 4) {
              alert("winner");
              if (event.target.status == 200) {
                  $('#dropZone').text('Upload Complete!');
  
              }
              else {
                  dropZone.text('Upload Failed!');
                  dropZone.addClass('error');
              }
          }
      };
      xhr.open('POST', 'Home/handleFileUpload', true);
      xhr.setRequestHeader('X-FILE-NAME', file.name);
      xhr.send(file);
  };
  </code></pre>
  
  <p>fiddler is showing a 200 with some binary results. How do I make the browswer save/download it as a zip?</p>