You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I need to do some checks before files get uploaded. Specifically, I need not to allow to re-upload the same file twice, so I need to check for that. By following this thread, I'm setting autoQueue: false, and then calling this.enqueueFile() on the 'addedfile' hook. And I'm currently getting this error:
Uncaught Error: This file can't be queued because it has already been processed or was rejected.
By loggin file infos, it seems it's accepted and its status is 'added', so I can't get why I'm getting that error.
Original DZ's source code is the following:
enqueueFile(file){if(file.status===Dropzone.ADDED&&file.accepted===true){file.status=Dropzone.QUEUED;if(this.options.autoProcessQueue)returnsetTimeout(()=>this.processQueue(),0);// Deferring the call}elsethrownewError("This file can't be queued because it has already been processed or was rejected.");}
So it should go and queue... Instead, it goes to the error...
Why? On the stackoverflow thread you can see that there are other people having the same issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi, I need to do some checks before files get uploaded. Specifically, I need not to allow to re-upload the same file twice, so I need to check for that. By following this thread, I'm setting
autoQueue: false, and then callingthis.enqueueFile()on the'addedfile'hook. And I'm currently getting this error:Uncaught Error: This file can't be queued because it has already been processed or was rejected.
By loggin file infos, it seems it's accepted and its status is 'added', so I can't get why I'm getting that error.
Original DZ's source code is the following:
So it should go and queue... Instead, it goes to the error...
Why? On the stackoverflow thread you can see that there are other people having the same issue.
All reactions