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
How can we resume failed uploads? #1150
Comments
Hi, did you solve this problem? |
I stopped using dropzone :( https://github.com/blueimp/jQuery-File-Upload |
My workaround (remove all files, reset status and add them back):
|
40rn05lyv, I'm not sure if you're using jquery object under $ sign, but if so there's an innacuracy in the solution. Each method's callback on arrays receives array index as the fist parameter and value as the secound. So the solution should be: var dropzoneFilesCopy = dropzone.files.slice(0);
dropzone.removeAllFiles();
$.each(dropzoneFilesCopy, function(_, file) {
if (file.status === Dropzone.ERROR) {
file.status = undefined;
file.accepted = undefined;
}
dropzone.addFile(file);
}); |
Should I add this snippet to end of my dropzone.config file just to make it work?
|
Try changing the file status from "error" to "queued" on upload error and then calling processQueue() to continue processing.
Add infinite loop protection as needed. |
@nkogit solution works well. Thanks to him. Below an example with infinite loop protection.
|
file.status = Dropzone.QUEUED |
Is there a way to make it so that failed uploads can be resumed or retried?
The text was updated successfully, but these errors were encountered: