flowjs / flow.js

A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.
Other
2.96k stars 346 forks source link

Crash browser on large file #291

Open mehmetranas opened 4 years ago

mehmetranas commented 4 years ago

I can not uload a large file. I think there is a memory crash on large file upload. Is there any config to solve my issue? here is my configuration

projectFileFlowConfig = {
    uploadMethod: "PUT",
    testChunks: false,
    speedSmoothingFactor: 0.02,
    simultaneousUploads: 1,
    headers: {
      "Content-Type": "application/zip"
    },
    preprocess: (chunk: any) => {
      const value = uuidv4();
      const blockId = btoa(value);
      chunk.flowObj.opts.query["blockIds"].push(blockId);
      chunk.flowObj.opts.target =
        chunk.flowObj.opts.query["urlWithSas"] +
        `&comp=block&blockid=${blockId}`;
      chunk.preprocessFinished();
    }
  };
aayusharyan commented 4 years ago

@mehmetranas What was the file size you are using, also what is the configuration of the Client from which you are trying to upload the file?

I have tested up to 10G with chunks of 128M on i5 with 16G of RAM. (Using Chrome).

yinyukang-cuc commented 4 years ago

@aayusharyan Using internet explorer11 and firefox,uploading large file will cause memory leak。IE11 and firefox will not collect garbage。In IE11,CollectGarbage function is not useful.

SanaaAfifi commented 2 years ago

@mehmetranas can you post how did you solve that ?

mehmetranas commented 2 years ago

Unfortunately, I didn't fix.