1

I have created this function and adding downloads in the Rn fetch blob

import RNFetchBlob from 'rn-fetch-blob'

 const files_que = [...items];

    const Downloadingque = async () => {
        while (files_que.length > 0) {
            const download_obj = files_que.shift()
            let dirs ="path" + '/' + download_obj.uri
            await processdownloadVideo(download_obj.http_uri, dirs, type);
        }
    }
    const download_progress = Array(2).fill(workerFn());
    return Promise.all(download_progress);

By using this code i am downloading 100 and adding 2 files on parallel mode to download. I am getting an issue in this as the internet is off my downloading is also stopped. But i want that it will pause and if getting internet connection then again resume as from it is paused.

Rover
  • 661
  • 2
  • 18
  • 39

0 Answers0