diff --git a/client/js/uploader.api.js b/client/js/uploader.api.js index 2603c4354..68bf9acbb 100644 --- a/client/js/uploader.api.js +++ b/client/js/uploader.api.js @@ -255,7 +255,7 @@ } } - if (newStatus === qq.status.UPLOAD_RETRYING) { + if (oldStatus === qq.status.UPLOAD_RETRYING && newStatus === qq.status.UPLOADING) { this._templating.hideRetry(id); this._templating.setStatusText(id); qq(this._templating.getFileContainer(id)).removeClass(this._classes.retrying); diff --git a/client/js/uploader.basic.api.js b/client/js/uploader.basic.api.js index b2b6086b4..c5a1a6eb2 100644 --- a/client/js/uploader.basic.api.js +++ b/client/js/uploader.basic.api.js @@ -1313,13 +1313,15 @@ self._preventRetries[id] = responseJSON[self._options.retry.preventRetryResponseProperty]; if (self._shouldAutoRetry(id, name, responseJSON)) { + var retryWaitPeriod = self._options.retry.autoAttemptDelay * 1000; + self._maybeParseAndSendUploadError.apply(self, arguments); self._options.callbacks.onAutoRetry(id, name, self._autoRetries[id]); self._onBeforeAutoRetry(id, name); + self._uploadData.setStatus(id, qq.status.UPLOAD_RETRYING); self._retryTimeouts[id] = setTimeout(function() { - self.log("Retrying " + name + "..."); - self._uploadData.setStatus(id, qq.status.UPLOAD_RETRYING); + self.log("Starting retry for " + name + "..."); if (callback) { callback(id); @@ -1327,7 +1329,7 @@ else { self._handler.retry(id); } - }, self._options.retry.autoAttemptDelay * 1000); + }, retryWaitPeriod); return true; }