Im using Expo.Filesystem.downloadAsync to download large no. of files like images & videos. But it sometimes stuck indefinitely at some point. Im tying to download files inside a loop. The code is :
let image_downloading = section.map(async (item, i) => {
item.image !== null ?
await FileSystem.downloadAsync(item.image,
directory + item.image.split("/").reverse()[0]
)
.then(({ uri }) => {
item['image'] = uri;
console.log('Finished downloading section to ', uri);
})
.catch(({error}) => {
console.log('errorrrrrrrrrrrrr',error)
})
: null
});
await Promise.all(image_downloading);
Also i've tried using FileSystem.createDownloadResumable. When using createDownloadResumable the downloading is getting very slow