gcs-browser-upload icon indicating copy to clipboard operation
gcs-browser-upload copied to clipboard

It doesn't resume upload after restoring internet connection,

Open aqib008 opened this issue 2 years ago • 0 comments

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);
      }
    };

aqib008 avatar Aug 15 '23 11:08 aqib008