title: Post a file via Request Factory in Kohana
body: <p>Is it possible to simulate a file upload request in Kohana 3.2? I was trying the following but not having much luck:</p>
  
  <pre><code>$file = file_get_contents('../../testimage.jpg');
  
  $request = new Request('files');
  $request-&gt;method(HTTP_Request::POST);
  $request-&gt;post('myfile', $file);
  //$request-&gt;body($file);
  $request-&gt;headers(array(
              'content-type' =&gt; 'multipart/mixed;',
              'content-length' =&gt; strlen($file)
          ));
  $request-&gt;execute();
  </code></pre>