title: Ionic-3 Image Upload using FileTransfer Native to NodeJs server
body: <p>I followed one of tutorial from @Simon_Grimm blogs. It's a simple Ionic image upload to Node.js. Everything is perfectly working except the upload. I can display image from the server into my Ionic Client, I can delete as well as. My HTTP request for delete and getting images are working perfectly. Only whenever I click the upload button it can't communicate with my backend. It populated the error where mention http_status = null, body = null etc. I could not understand why does not work? For file uploading to native File transfer. As far as I can fell my problem is that somehow my upload method could not trigger the HTTP request. 
  I would be glad if anyone can guide me, please. </p>
  
  <p>My image upload serveice provider is</p>
  
  <p>image-upload-setting.ts, here is my uploadMethod. My error was triggered at this <code>return filetransfer callback (err)=&gt;</code></p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import 'rxjs/Rx';
  import {Http, Response} from "@angular/http";
  import { Observable } from 'rxjs/Rx';
  import { Headers } from '@angular/http';
  import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer';
  import { File } from '@ionic-native/file';
  
  
  @Injectable()
  export class ImageUploadSettingsProvider {
  
    constructor(private http: Http, private transfer: FileTransfer, private file: File) {
      console.log('Hello ImageUploadSettingsProvider Provider');
  
  
    }
  
  
  
    imageUpload(imageData, desc){
      let requestUrl = 'http://localhost:5000/images/'+ 'upload'; 
      var destination = imageData; 
  
      var options: FileUploadOptions = {
            fileKey: 'file',
            chunkedMode: true,
            mimeType: 'multipart/form-data',
            params: { 'desc': desc }
      };
      const fileTransfer: FileTransferObject = this.transfer.create();
      return fileTransfer.upload(destination,requestUrl,options).then(
          (data)=&gt;{
              console.log('ImageProvider Upload Data-',data); 
          },
          (err)=&gt;{
              console.log( err ); 
          }
      )
  
    }; 
  
  
  
  }
  </code></pre>
  
  <p>Its means that my uploadMethod <code>successfull .then((data)=&gt;{})</code> doesn't work. </p>
  
  <p>My html.ts is</p>
  
  <pre><code>onSubmit(form: NgForm){
    this.imageProvider.imageUpload(this.imageUrl, form.value.desc).then(
      (res)=&gt;{
          form.reset(); 
      },
      (err)=&gt;{
          console.log(err); 
      }
    );
  };
  
  
   onTakePhoto(){
  
        const options: CameraOptions = {
                  quality: 100,
                  encodingType: this.camera.EncodingType.JPEG,
                  correctOrientation: true,
                  allowEdit: true,
                  destinationType: this.camera.DestinationType.FILE_URI,
                  mediaType: this.camera.MediaType.PICTURE,
                  sourceType: this.camera.PictureSourceType.CAMERA,
             }
  
         this.camera.getPicture(options).then((imageData)=&gt;{
  
  
  /*
            let base64Image = 'data:image/jpeg;base64,' + imageData;
             this.imageUrl = base64Image   */
  
  
         this.imageUrl = imageData; 
  
  
      }, (err) =&gt; {
            const toast = this.toastCtr.create({
                message:'Could Not save the image. Please try again',
                duration:2500
              });
              toast.present();
              this.camera.cleanup();
          });
  
  }
  </code></pre>
  
  <p>I tried to change the formate to base64. Unfortunately it doesn't work as well as. Then I uncomment it. Now I am pulling my hair since 1 week. </p>
  
  <p>Thanks for your effort</p>