Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DanClarke33 opened this issue Feb 14, 2013 · 0 comments

Comments

@DanClarke33
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant