title: Transfer file to webworker: DataCloneError: The object could not be cloned
body: <p>I want to transfer a file from a form to a webworker. In chrome i simple can use this code to transfer a FileList-Object:</p>
  
  <pre><code>worker.postMessage(files: array_files);
  </code></pre>
  
  <p>But with Firefox i get this error: </p>
  
  <pre><code>Transfer file to webworker: DataCloneError: The object could not be cloned.
  </code></pre>
  
  <p>So i tried to use the Syntax for transferable objects. Something like this?</p>
  
  <pre><code>var post = {files: array_files, file_ids: response.file_ids};
  worker.postMessage(post, [post]);
  </code></pre>
  
  <p>But with that i get this in Chrome</p>
  
  <pre><code>Uncaught DataCloneError: Failed to execute 'postMessage' on 'Worker': Value at index 0 does not have a transferable type.
  </code></pre>
  
  <p>And still</p>
  
  <pre><code>DataCloneError: The object could not be cloned.
  </code></pre>
  
  <p>in Firefox.</p>
  
  <p>What is the right way to pass a FileList to a worker?</p>