title: How to convert the byte code to zip file in javascript
body: <p>Im using the following code to convert the byte code to zip file but it does not download the actual xml and asc file send in the response , instead it just donwloads the standard zip contents , im not aware where i am going wrong , can anyone help me with this,</p>
  
  <pre><code> $http({
      url:url,
      method: requestType,
      data:requestBody?requestBody:"",
      headers: {
         'Content-type': "application/json",
         "SessionID":$rootScope.token
      },
      responseType: 'arraybuffer'
  }).success(function (data, status, headers, config) {
      let blob = new Blob([data], {type: "application/zip"});
      let objectUrl = URL.createObjectURL(blob);
      let link = document.createElement('a');
      link.href = objectUrl;
      link.download = fileName;
      link.click();
      window.URL.revokeObjectURL(link.href);
      $scope.exp = {}; // to reset the export form after submit.
      $scope.surveyReportdownloading = false;
      $scope.tabActive = false;
   }).error(function (error) {
      //upload failed
      console.log(error);
  });
  </code></pre>
  
  <p>this is not downloading the actual files at all. Can anyone help me through this. The byte cod ethat backend team is sending is as follows.</p>
  
  <pre><code>"PK:8xJMÆVÞ|xl/workbook.xml ¢( ÍnÂ0ïúÖ&gt;@MpR­¸{C,²vdÑ¾}CR¢¶'n;³³fË«uç£µgöI­ñ«    ¡+8÷²AþÅvhú]mÐKwâ¶®µÄBxEwØ ­ñî&lt;´GX¾s(oµ#6°|~b¬¼5;h¼úAöÆ½îÍd|ñ¿©rMbFVð~!îØ`nT10Wè~Ø4SäiÅÑ,ÇWøÁÿC|¼í¶ëÃzûL/ó4KËYZG0U:üþÂòPK:8xJnmt?Ø[Content_Types].xml ¢( ÅMNÃ0¯y·] vl¡\À²'ÕøGIiÏÆ#q&amp; TUÐªº²lÏ{ßõä·÷é|ãl
  mð¥#×ÁX¿,EKU~#æ³éË6f\ê±5Q¼u
  </code></pre>
  
  <p>Na"x¾©Brx2*½RKÑèZêà   &lt;åÔyÙô<em>Õ6=løxÀ²\dwC]</em>±±Z_Ëµ7¿ y¨*«ÁÝ:(5¹¦è×Â)ë¯zc¹ Áã _S¬ìk°¶w'~Äd
  dèQ9öF¾´êBÙ/ãâ¼ÃîüÿkiÛ>þfå"Çã¿½Sç =ÉÞ']d£áºE
  îdþ`s(}Oâ&amp;K\­gJü=x?½wÈþ}PK
  38xJ£ ²×rels/.rels ¢( ï»¿PK:8xJILE@¥¶xl/worksheets/sheet1.xml ¢( ¥ÛrÇEÅ÷èn\U\¡\q®ª%^ÿþõË¯ûÃ/·W»Ýñìÿ|"</p>
  
  <p>Any help is appreciated. Thanks!</p>