Is there any way to sent contact profile image to server


#1

I am using contact plugin in ionic 3. Contact display working fine. My problem is when I am import contact from device like mobile, email working fine, but contact profile image is not import. Image imported 0 size.

importcontact(number:any,imagepath:any){
 const fileTransfer: FileTransferObject = this.transfer.create();

      let options: FileUploadOptions = {
         fileKey: 'file',
         headers: {}
      }

    fileTransfer.upload(imagepath, 'API URL HERE ', options,true)
   .then((data) => {
      alert(JSON.stringify(data));
   }, (err) => {
     alert("error"+JSON.stringify(err));
   });
}

Response:
{“bytesSent”:0,“responseCode”:200}