Переглянути джерело

Fix #1382: Better defaults for chunkSize and progressDelay

Kartik Visweswaran 6 роки тому
батько
коміт
61e74639e3
3 змінених файлів з 5 додано та 3 видалено
  1. 2 0
      CHANGE.md
  2. 3 3
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 2 - 0
CHANGE.md

@@ -5,6 +5,8 @@ Change Log: `bootstrap-fileinput`
 
 **Date:** 26-Mar-2019
 
+- (enh #1382):  Better defaults for `resumableUploadOptions.chunkSize` and `progressDelay`.
+    - Set defaults for `progressDelay` to `0` and `resumableUploadOptions.chunkSize` to `2048 KB` i.e. (`2 MB`)
 - (bug #1381): Fix `uploadExtraData` to be submitted correctly with ajax responses.
 - (enh #1379): Add ability to sanitize zoom cache. New property `sanitizeZoomCache` which is a function callback and defaults to:
     ```js

+ 3 - 3
js/fileinput.js

@@ -5037,9 +5037,9 @@
                 }
             }
             self._hideFileIcon();
-            self._raise('filecleared');
             self.$captionContainer.focus();
             self._setFileDropZoneTitle();
+            self._raise('filecleared');
             return self.$element;
         },
         reset: function () {
@@ -5367,12 +5367,12 @@
         maxAjaxThreads: 5,
         processDelay: 100,
         queueDelay: 10, // must be lesser than process delay
-        progressDelay: 50, // must be lesser than process delay
+        progressDelay: 0, // must be lesser than process delay
         enableResumableUpload: false,
         resumableUploadOptions: {
             fallback: null,
             testUrl: null, // used for checking status of chunks/ files previously / partially uploaded
-            chunkSize: 10 * 1024, // in KB
+            chunkSize: 2 * 1024, // in KB
             maxThreads: 4,
             maxRetries: 3,
             showErrorLog: true

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
js/fileinput.min.js


Деякі файли не було показано, через те що забагато файлів було змінено