title: Attaching file using redmine rest api
body: <p>i have a little problem when i try to attach file to redmine rest api, i'm using php-redmine-api-master :</p>
  
  <pre><code>if ($_FILES["file"]["error"] &gt; 0)
      {
      echo "Error: " . $_FILES["file"]["error"] . "&lt;br&gt;";
      }
  else{
  $attachement=file_get_contents($_FILES['file']['tmp_name']);
  $upload = json_decode( $client-&gt;api('attachment')-&gt;upload($attachement) );
  $client-&gt;api('issue')-&gt;create(array(
      'project_id'     =&gt; 12,
      'subject'        =&gt; 'test api3 (xml) 3',
      'description'    =&gt; 'test api3',
      'assigned_to_id' =&gt; 23,
      'uploads'     =&gt; array(
          array(
            'token'       =&gt; $upload-&gt;upload-&gt;token,
            'filename'    =&gt; $_FILES["file"]["name"],
            'description' =&gt; 'MyFile is better then YourFile...',
            'content_type'=&gt; 'image/png'
          )
      )
  ));
  print_r($client);
  }
  </code></pre>
  
  <p>the problem is that the file attched is saved incorrectly into redmine server !</p>