title: IE11 doesn't work well with Blob constructor & javascript array
body: <p>I've been using Blob of HTML5 to consolidate a bunch of data including files and strings. Since the files and strings to be sent are not pre-specified in program, and I need to pack all data in a JS file and send them immediately, so I use Array of javascript to collect available data, then make this array as a parameter of Blob constructor. It works fine in Chrome and Firefox, but throws a javascript error when using IE11.</p>
  
  <blockquote>
    <p>Unhandled exception at line 161, column 9 in @#$%.js
    0x800a139e - JavaScript Runtime Error: InvalidStateError</p>
  </blockquote>
  
  <p>My code is as follows:</p>
  
  <pre><code>var blobPackage_array = [];
  if(userType != null)
      blobPackage_array.push(userType);
  
  if(userInfo != null)
      blobPackage_array.push(userInfo);
  
  for (var i = 0; i &lt; fileList.length; i++) {
      blobPackage_array.push(fileList[i]);
  }  
  
  var blobPackage = new Blob(blobPackage_array); //throw javascript runtime error
  </code></pre>
  
  <p>I previously suspected that IE doesn't support Blob, so I tested this: </p>
  
  <pre><code>var blobPackage = new Blob(["test", fileList[0]]);  
  </code></pre>
  
  <p>It worked fine, no error. My last guess is that IE doesn't recognise <code>blobPackage_array</code> as a valid parameter of Blob constructor. But Blob doesn't have a append method, meanwhile I can not know how many files that need to be appended, which means I can not construct a Blob once and for all. 
  Anyone ever encounter this? anything I can use to bypass this? I'd appreciate any suggestion.</p>
  
  <hr>
  
  <p>Update! For some reason, I can not use <code>FormData</code> instead, It has to be blob...
  anybody can help me on this?</p>
  
  <hr>
  
  <p>Update again! Thanks to your kind reply, there are some progress. I checked MSDN, Blob's constructor should be like this: <code>var blobObject = new Blob([new Uint8Array(array)], { type: 'image/png' });</code>. I tried to construct a <code>Uint8Array</code> with <code>blobPackage_array</code> by this <code>var uint8array = new Uint8Array(blobPackage_array);</code>. I find that data is lost while this transformation. But in fact, <code>var blobPackage = new Blob([uint8array]);</code> can work, without errors. Thus I just need to fix the transformation problem.</p>