From 5a8385439409e094e367466730965ce5fa354142 Mon Sep 17 00:00:00 2001 From: Tomasz Swiderski Date: Wed, 5 Feb 2014 10:48:41 +0100 Subject: [PATCH] In case progress request results in http error, clear the timer and report a problem. --- jquery.uploadProgress.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jquery.uploadProgress.js b/jquery.uploadProgress.js index 42f5c0b..d161612 100644 --- a/jquery.uploadProgress.js +++ b/jquery.uploadProgress.js @@ -116,6 +116,11 @@ jQuery.uploadProgress = function(e, options) { // Null/false/empty response, assume we're out of process options.success(upload); } + }, + error: function(upload) { + window.clearTimeout(options.timer); + options.complete(upload); + options.error(upload); } }); };