title: how to transfer the taken image using ngcordova file transfer plugin to my ftp
body: <p>I am trying to upload image to my FTP. </p>
  
  <p>what i have achived so far is in this <a href="https://plnkr.co/edit/w18GRwURfU9vHTbB9Uch" rel="nofollow">plnkr</a></p>
  
  <p>my cordova file transfer looks like </p>
  
  <pre><code>$scope.upload =function(){
  
        var options = {
           fileKey: "file",
           fileName: "gopi",
           chunkedMode: false,
           mimeType: "image/jpeg",
           params : {'user_token':'Chandru@123', 'user_email':'wepopusers'} // directory represents remote directory,  fileName represents final remote file name
         };
         console.log(options);
        $cordovaFileTransfer.upload('ftp://308.3d8.myftpupload.com/',  MyService.getImgPath(), options)
          .then(function(result) {
            // Success!
            console.log(result);
            console.log("SUCCESS: " + JSON.stringify(result.response));
            alert('ftp success');
          }, function(err) {
            // Error
            console.log(err);
            alert('ftp fail');
            console.log("ERROR: " + JSON.stringify(err));
          }, function (progress) {
            // constant progress updates
            console.log(progress);
          });
  
      };
  </code></pre>
  
  <p>My response of my error function for cordova file looks like </p>
  
  <blockquote>
    <p>FileTransferError {code: 2, source: "file:///storage/sdcard0/Android/data/com.ionicframework.camera108827/cache/1462186990291.jpg", target: "<a href="ftp://308.3d8.myftpupload.com/" rel="nofollow">ftp://308.3d8.myftpupload.com/</a>", http_status: null, body: null…}body: nullcode: 2exception: nullhttp_status: nullsource: "file:///storage/sdcard0/Android/data/com.ionicframework.camera108827/cache/1462186990291.jpg"target: "<a href="ftp://308.3d8.myftpupload.com/" rel="nofollow">ftp://308.3d8.myftpupload.com/</a>"<strong>proto</strong>: Object</p>
  </blockquote>
  
  <p>I have button <strong>TakePicture</strong> which will take the pic and show to the user and also I have a function to upload using cordovafiletransfer <strong>$scope.upload</strong> .</p>
  
  <p>my ftp host is <code>ftp://308.3d8.myftpupload.com/</code> username and password is given in my coding in this i have a folder name called <strong>gopi</strong> where my image should store.</p>
  
  <p>my path of the image taken is in imageURI parameter so i used services to set the path.</p>
  
  <p><strong>steps I’m in confusion</strong> </p>
  
  <blockquote>
    <p>1) I am not able to understand the <strong>var options</strong> object in cordova file transfer plugin.</p>
    
    <p>2) I am not getting any erro while remote debugging but i am only invoking my error funtion in my cordova file transfer.</p>
    
    <p>How can i update my taken image to FTP using IONIC</p>
  </blockquote>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Thanks to gandhi's answer <a href="https://github.com/xfally/cordova-plugin-ftp" rel="nofollow">https://github.com/xfally/cordova-plugin-ftp</a> some how i managed to connect to ftp without multipart.</p>
  
  <p>but sill facing error in this </p>
  
  <blockquote>
    <p>$window.cordova.plugin.ftp.upload("/ping", "/gopi/ping", function(percent) {</p>
  </blockquote>
  
  <p>i don't know what to in the first argument and second. </p>
  
  <blockquote>
    <p>$window.cordova.plugin.ftp.upload("/default.prop", "/gopi/default.prop", function(percent) {</p>
  </blockquote>
  
  <p>the above line success fully posted to my ftp but i am not able to post my image which is stored in my ping variable. </p>
  
  <p><a href="https://plnkr.co/edit/ETGmdl4B0d5dlHWdJQ9m?p=info" rel="nofollow">https://plnkr.co/edit/ETGmdl4B0d5dlHWdJQ9m?p=info</a></p>