Skip to content

Commit

Permalink
Allow error history to be displayed for resumable uploads fix #1687 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Feb 27, 2021
1 parent 98aeac3 commit e38e5cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Change Log: `bootstrap-fileinput`

**Date**: _under development_

- (enh #1687, #1688): Allow error history to be displayed for resumable uploads.
- new boolean property `resumableUploadOptions.retainErrorHistory`
- (enh #1683): Better correct CSP Buffer Stash using CSSStyleDeclaration.
- (enh #1681): Update Turkish Translations.
- (bug #1678): Resumable upload error handling fixes
Expand Down
10 changes: 6 additions & 4 deletions js/fileinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
chunkQueueError: 'Could not push task to ajax pool for chunk index # {index}.',
resumableMaxRetriesReached: 'Maximum resumable ajax retries ({n}) reached.',
resumableRetryError: 'Could not retry the resumable request (try # {n})... aborting.',
resumableAborting: 'Aborting / cancelling the resumable request.'
resumableAborting: 'Aborting / cancelling the resumable request.',
resumableRequestError: 'Error processing resumable request. {msg}'

},
objUrl: window.URL || window.webkitURL,
Expand Down Expand Up @@ -1536,7 +1537,7 @@
if (tokens) {
msg = msg.setTokens(tokens);
}
msg = 'Error processing resumable request. ' + msg;
msg = msgs.resumableRequestError.setTokens({msg: msg});
self._log(msg);
deferrer.reject(msg);
};
Expand Down Expand Up @@ -2261,8 +2262,8 @@
$h.addCss(self.$captionContainer, 'is-invalid');
},
_resetErrors: function (fade) {
var self = this, $error = self.$errorContainer;
if (self.isPersistentError) {
var self = this, $error = self.$errorContainer, history = self.resumableUploadOptions.retainErrorHistory;
if (self.isPersistentError || (self.enableResumableUpload && history)) {
return;
}
self.isError = false;
Expand Down Expand Up @@ -5933,6 +5934,7 @@
maxThreads: 4,
maxRetries: 3,
showErrorLog: true,
retainErrorHistory: true, // display complete error history always unless user explicitly resets upload
skipErrorsAndProceed: false // when set to true, error file will be skipped and upload will continue with other files
},
uploadExtraData: {},
Expand Down

0 comments on commit e38e5cd

Please sign in to comment.