How to upload multiple files without calling api multiple times.. any suggestions?


#1
submitem()
{

  
  let fiel : FileTransferObject=this.transfer.create();
  //let img=this.transfer.create();
  this.imagsdate.fimag=this.fphoto;
  this.imagsdate.simag=this.sphoto;
  this.imagsdate.timag=this.tphoto;
  
  for(let key in this.imagsdate){
     

  let options: FileUploadOptions = {
      fileKey: "files[]",
      fileName: key+'.jpg',
      chunkedMode: false,
      mimeType: "multipart/form-data",
      //params: { city: post.city, country: post.country, lat: post.lat, lon: post.lon }
 
 }

  fiel.upload(this.imagsdate[key],'http://192.168.1.119/proexpert/api',options).then((res)=>{
    console.log(JSON.stringify(res));
    console.log('send');
  }).catch((err)=>{
    console.log(JSON.stringify(err));
    console.log('not send');
    
  }) 
}
}