It doesn't resume upload after restoring internet connection,
aqib008 opened this issue · comments
Aqib Javed commented
It doesn't resume upload after restoring internet connection,
Lets say user select file 0f 100 mb, after 50 mb the internet connection gets lost, it raise an error of networkError but on restoring internet it doesn't resume that upload.
Here is my code:
const chunkSize = 262144 * 4;
const uploadFile = async (
file,
url,
id
) => {
const upload = new Upload({
id,
url,
file,
chunkSize,
onChunkUpload: (info) => {
console.log(info)
},
});
try {
await upload.start();
} catch (e) {
console.log('Upload failed!', e);
}
};