FineUploader/fine-uploader

combining chunks of a large file produces file too large

elevenpast opened this issue · 1 comments

Type of issue

  • Bug report

Uploader type

  • Traditional
chunking success called multiple times resulting in oversized file

Fine Uploader version

5.16.2

Browsers where the bug is reproducible

{example: "Firefox" and "IE11"}

Operating systems where the bug is reproducible

Any OS, tested on google chrome

Exact steps required to reproduce the issue

Upload large file, 7GB with chunking enabled

All relevant Fine Uploader-related code that you have written

chunking: {
        enabled: true,
        concurrent: { enabled: true},
        partSize: 20 * 1048576,
        success: { endpoint: myhost + "/success" }
    },

Your Fine Uploader template markup (if using Fine Uploader UI and the issue is UI-related)

{simply copy and paste your template markup}

Detailed explanation of the problem

chunking success gets called at the end of a large upload (7GB).
As the chunks are being combined on the backend (nodejs), it takes approximately 2 minutes to complete.
After roughly 60 seconds, the chunking success call occurs again, is this retry logic?
As a result, their are 2 processes combining the chunks.
The resulting file is too large.
Chunk size: 20MB, 353 total chunks.

It appears that if combineChunks() doesn't finish quickly enough, it will auto retry and kick off another separate process and corrupt the file.

This isn’t a fine Uploader issue. My guess is that the request is timing out or being cancelled due to the fact that the connection is idle for so long. ELBs are known to do this, for example. You’ll need to consider another approach server side, such as combining chunks async or combining them as the chunks come in.