title: POST'ing multipart data based on previously retrieved "binary" data
body: <p>I am trying to simulate a file upload to a webserver that accepts "normal" file upload http requests but iso getting the file data using the typical input type=file form element I would like the POST'ed content to come from the result of a previous http GET </p>
  
  <p>I think I have the GET part done using something like </p>
  
  <pre><code>function load_binary_resource(url) {
      var req = new XMLHttpRequest();
      req.open('GET', url, false);
      req.overrideMimeType('text/plain; charset=x-user-defined');
      req.send(null);
      if (req.status != 200) {
          return '';
      }
      return req.responseText;
  }
  </code></pre>
  
  <p>Question now is how I can POST this so that the server code that acceptsa more typical file upload HTTP request can stay the same.</p>
  
  <p>I have been trying with the jQuery forms plugin but I can't seem to get the binary content POST'ed to the server</p>
  
  <p>All help certainly warmly welcomed!</p>
  
  <p>Thanks</p>
  
  <p>Peter</p>