Ionic File Transfer issue

Hello,

I’m trying to download some files stored locally on a remote node server and serving them with express.static(‘folder’) etc
I see that download it’s working properly and files are stored inside Documents directory (cordova.file.dataDirectory for IOS) but my files are empty (Zero Bytes sizes). Can you please

This is my download function downloadModels(data): Promise {
let modelPromises = [];

data.forEach( (value, key, index) => {
  let path = 'assets/models/' + value;
  let url = "https://192.168.0.101:3003/files/" + value;
  modelPromises.push(
    this.fileTransfer.download(url, cordova.file.dataDirectory + value)
  )
});

return Promise.all(modelPromises).then((entries) => entries);

}

which i’m calling several times for every file that i need.

Please let me know if you need more info about this issue.

Thank you!

What is this “let path = ‘assets/models/’ + value;”?

Some unnecessarly code from other tries :confused: