Closed heyalexchoi closed 2 years ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
react-native-cloud-store | ✅ Ready (Inspect) | Visit Preview | Sep 17, 2022 at 11:33PM (UTC) |
Such a long time, 0.8.0 has been released and upload
/download
now support onProgress
option.
If you want to resolve until finished, you can write like this:
await new Promise(async (resolve, reject) => {
CloudStore.download(path, {
onProgress(data) {
if(data.progress === 100) {
resolve()
}
}
}).catch(reject)
})
Most straightforward and obvious use of persist and upload IMO is
which means you want to know when the upload/download is finished. I modified the way the methods work to resolve / reject when the upload / downloads finish or error.