Closed EndLess728 closed 3 years ago
Thanks for the suggestion @EndLess728. This was added in the latest release (2.0.0). You can get it from npm right now.
So if before you were calling downloadToFolder
as follows:
await downloadToFolder(uri, filename, folder, channelId);
you can now call it with the following callback and you will get back the progress information you want:
const downloadProgressCallback = ({totalBytesWritten, totalBytesExpectedToWrite}) => {
const pctg = 100 * (totalBytesWritten / totalBytesExpectedToWrite);
setProgressInfo(`${pctg.toFixed(0)}%`);
};
await downloadToFolder(uri, filename, folder, channelId, {downloadProgressCallback});
Hope this helps!
Hi, I have a question related to this issue. Is it possible to show the progress in the Notification? This library is awesome!
I need to show download progress in percentage so I need download progress feature to achieve it.
PS: Library is awesome working like charm.