title: cordova android image upload failed
body: <p>Having some issues with getting the cordova filetransfer to work.</p>
  
  <p>I am reading the logs and it seems the file is getting transfered but the server is striping the extension off and writing 0 size. Using blueimp file-upload server handler. The upload handler works on my jquery scripts. I have gotten it to work before. Not sure what changed and all of the sudden its not writing the file correctly.</p>
  
  <p>Here is the log from the logcat</p>
  
  <pre><code>D/FileTransfer(22082): Sent 100387 of 100387
  D/FileTransfer(22082): response code: 200
  D/FileTransfer(22082): response headers: {null=[HTTP/1.1 200 OK], Access-Control
  -Allow-Origin=[*], Cache-Control=[no-store, no-cache, must-revalidate], Connecti
  on=[close], Content-Disposition=[inline; filename="files.json"], Content-Type=[t
  ext/plain], Date=[Fri, 31 Jan 2014 08:28:24 GMT], Pragma=[no-cache], Server=[Apa
  che/2.4.7 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4], Transfer-Encoding=[chun
  ked], Vary=[Accept], X-Android-Received-Millis=[1391156904056], X-Android-Respon
  se-Source=[NETWORK 200], X-Android-Sent-Millis=[1391156902868], X-Content-Type-O
  ptions=[nosniff], X-Powered-By=[PHP/5.4.23]}
  D/FileTransfer(22082): got response from server
  D/FileTransfer(22082): {"files":[{"name":"52eb5ea9309fe","size":0,"type":"multip
  art\/form-data;boundary=+++++","error":"abort","deleteUrl":"http:\/\/drayagedev.
  fr8taxi.com\/images\/uploader\/?file=52eb5ea9309fe","deleteType":"DELETE"}]}
  D/CordovaLog(22082): file:///android_asset/www/js/dashboard_driver.js: Line 305
  : Code = 200
  I/chromium(22082): [INFO:CONSOLE(305)] "Code = 200", source: file:///android_ass
  et/www/js/dashboard_driver.js (305)
  D/CordovaLog(22082): file:///android_asset/www/js/dashboard_driver.js: Line 306
  : Response = {"files":[{"name":"52eb5ea9309fe","size":0,"type":"multipart\/form-
  data;boundary=+++++","error":"abort","deleteUrl":"http:\/\/drayagedev.fr8taxi.co
  m\/images\/uploader\/?file=52eb5ea9309fe","deleteType":"DELETE"}]}
  I/chromium(22082): [INFO:CONSOLE(306)] "Response = {"files":[{"name":"52eb5ea930
  9fe","size":0,"type":"multipart\/form-data;boundary=+++++","error":"abort","dele
  teUrl":"http:\/\/**.com\/images\/uploader\/?file=52eb5ea9309fe",
  "deleteType":"DELETE"}]}", source: file:///android_asset/www/js/dashboard_driver
  .js (306)
  D/CordovaLog(22082): file:///android_asset/www/js/dashboard_driver.js: Line 307
  : Sent = 98416
  I/chromium(22082): [INFO:CONSOLE(307)] "Sent = 98416", source: file:///android_a
  sset/www/js/dashboard_driver.js (307)
  </code></pre>
  
  <p>Here is the function</p>
  
  <pre><code>function uploadPhoto(imageURI) {
      var options = new FileUploadOptions();
      options.fileKey="file";
      options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);
      options.mimeType="image/jpeg";
      options.headers = {
          Connection: "close"
      }
      options.chunkedMode = false;
  
      var params = {};
      params.fullpath = imageURI;
      params.name = options.fileName;
  
      //options.params = params; Uncommenting has no effect
  
      var ft = new FileTransfer();
      ft.upload(imageURI, encodeURI("http://**/images/uploader"), checkUploadStatus, checkUploadStatus, options);
  }
  </code></pre>