title: Angularjs + Cordova + UploadFile convert Img to file to do a POST
body: <p>I'm developing a Cordova 3.3.0 app + Angularjs.</p>
  
  <p>I'm trying to do a multipart POST. 
  The server is waiting for a file, I can't upload base64 string and I have the real path of the image stored in device.</p>
  
  <p>Also i have the base64 image if I need to use it.</p>
  
  <p>Input file is not supported in cordova.
  Obviosly I can't set the value to the input file for security reasons.</p>
  
  <p>So I have to convert the  or base64 to a file and then do the post.</p>
  
  <pre><code>//convert DOM img to file
  
  var data ={
  
  'lumen_moore_editar_usuario_rest[gender]':'M',
  'lumen_moore_editar_usuario_rest[file]':file
            };
  
  $http({url: WS_EDIT_USER, method: 'POST',
                  data: $.param(data),
                  transformRequest: angular.identity,
                  headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
              }).success(function(data, status, headers, config) {
                      console.log("EDITAR IMAGEN SUCCESS "+ data);
                  }).error(function(data, status, headers, config) {
                      console.log("EDITAR IMAGEN ERROR "+ data);
                  });
  </code></pre>
  
  <p>Is it possible??.
  I was looking alot this answer but not luck and I don't want to use FileTransfer.upload of cordova.</p>
  
  <p>Sorry for my english. </p>
  
  <p>Thanks!</p>