Skip to content

Subsequent uploads not processed when multiple files return false from the beforeEach check #110

Open
@DanClarke33

Description

@DanClarke33

When returning a false result from the beforeEach function if the number of files for which you return false meets the number of files allowed to be uploaded simultaneously (queuefiles option) then subsequent files from this point on are not processed.

The reason for this appears to be because within the process functon if false is returned from beforeEach the file is not removed from the processingQueue so this queue gradually fills until it is full.

At this point no subsequent files are processed as the process function always believes that the queue is full.

I've resolved this for my usage of the plugin by making the following change:

Ln 288 inside the process function on the beforeEach returns false else statement, added the following code which will remove the rejected item from the processingQueue:

// Remove from queue
processingQueue.forEach(function (value, key) {
if (value === fileIndex) processingQueue.splice(key, 1);
});

Have submitted a change proposal with this fix and the fix for issue #111
Thanks for the plugin by the way its been very handy, hope this helps out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions