title: Titanium trying to upload file to server
body: <p>I'm trying to upload some files to my website. I used this code from someone else;</p>
  
  <pre><code>var xhr = Titanium.Network.createHTTPClient();
  
  
  var file = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory + 'text.txt');
  Titanium.API.info(file);
  var toUpload = file.read();
  
  xhr.open('POST', 'http://www.domain.com/upload.php', false);
  xhr.send({media: toUpload});
  </code></pre>
  
  <p>I tried to run my app with this method, it says it's done uploading, but when I look, my files are not there.</p>
  
  <p>Also I used this PHP file to handle the upload;</p>
  
  <pre><code>&lt;?php
  $target = "upload/";
  $target = $target . basename( $_FILES['uploaded']['name']) ;
  $ok=1;
  if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
  {
  echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
  }
  else {
  echo "Sorry, there was a problem uploading your file.";
  }
  ?&gt;
  </code></pre>
  
  <p>Is there anything wrong, or do I have to change something?</p>
  
  <p>Thanks!</p>