Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Fix an issue where onAllComplete can be called multiple times per addFile() call #2022

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AndrewJDR
Copy link

_getNotFinished, which is used to determine when to fire the onAllComplete callback, wasn't accounting for files in the UPLOAD_FINALIZING state. For smaller files, this could cause onAllComplete to be called multiple times per set of files passed to addFiles().

Note, the expected result is for onAllComplete() to be called only once per call to addFiles().

…File() call.

_getNotFinished, which is used to determine when to fire the onAllComplete callback,
wasn't accounting for files in the UPLOAD_FINALIZING state. For smaller files, this could
cause onAllComplete to be called multiple times per set of files passed to addFiles().

Note, the expected result is for onAllComplete() to be called only once per call to addFiles().
@oles-bolotniuk
Copy link

+1 Please merge

This is pretty much critical, because as finalizing process of some files may take time - onAllComplete gets called twice:

  1. First time when all uploads are done
  2. Second time when finalizing of the last file is done

@singhjusraj singhjusraj self-assigned this Oct 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants