title: Posting images via wp.uploadFile XML RPC
body: <p>I want to mass upload images to my wordpress blog via XML RPC and then put images in to wordpress post via img tag. </p>
  
  <p>But my wordpress and wp.uploadFile not return base64 encodet file instead of valid image. </p>
  
  <p>Here is my php code. </p>
  
  <pre><code>&lt;?php $q = new IXR_Client('http://myblog.com/xmlrpc.php');
  $mediaarray = array(
  "name" =&gt; $image_name,
  "type" =&gt; $atrybuty[mime],
  "bits" =&gt; base64_encode($file),
  "overwrite" =&gt; false,
  );
  if(!$q-&gt;query('wp.uploadFile', 1, $uzyt, $has, $mediaarray)){
  
      echo $q-&gt;getErrorCode().': '.$q-&gt;getErrorMessage();
  }
  
  var_dump($q-&gt;getResponse());
  </code></pre>
  
  <p>response is </p>
  
  <pre><code>array(3) { ["file"]=&gt; string(24) "Pein_by_azurewrath87.jpg" 
  </code></pre>
  
  <p><code>["url"]=&gt; string(84) "http://myblog.com/wp-content/uploads/2012/01/Pein_by_azurewrath87.jpg" ["type"]=&gt; string(10) "image/jpeg" }</code></p>
  
  <p>But image is base64_encodet. How to proper send image to wordpress via wp.uploadFile or metaWeblog.newPost method.</p>