فهرست منبع

Allow error history to be displayed for resumable uploads fix #1687 fix #1688

Kartik Visweswaran 4 سال پیش
والد
کامیت
e38e5cd2b0
3فایلهای تغییر یافته به همراه8 افزوده شده و 4 حذف شده
  1. 2 0
      CHANGE.md
  2. 6 4
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 2 - 0
CHANGE.md

@@ -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

+ 6 - 4
js/fileinput.js

@@ -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,
@@ -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);
                         };
@@ -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;
@@ -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: {},

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
js/fileinput.min.js


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است