Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71027

Ionic 2 File Transfer issue

$
0
0

@miordache wrote:

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!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>