filepond 4.26.2 → 4.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/filepond.css +1 -1
- package/dist/filepond.esm.js +10 -4
- package/dist/filepond.esm.min.js +2 -2
- package/dist/filepond.js +11 -4
- package/dist/filepond.min.css +1 -1
- package/dist/filepond.min.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.27.0
|
|
4
|
+
|
|
5
|
+
- add `allowMinimumUploadDuration` set to `false` to prevent a minimum upload time of 750ms.
|
|
6
|
+
|
|
3
7
|
## 4.26.2
|
|
4
8
|
|
|
5
9
|
- `setMetadata` internal `silent` bool now does fire internal `DID_UPDATE_ITEM_METADATA` but doesn't trigger upload or file prepare logic. This fixes an issue with the new image editor and file poster plugins.
|
package/dist/filepond.css
CHANGED
package/dist/filepond.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond 4.
|
|
2
|
+
* FilePond 4.27.0
|
|
3
3
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
4
4
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
5
5
|
*/
|
|
@@ -1851,6 +1851,7 @@ const defaultOptions = {
|
|
|
1851
1851
|
// Upload related
|
|
1852
1852
|
instantUpload: [true, Type.BOOLEAN], // Should upload files immediately on drop
|
|
1853
1853
|
maxParallelUploads: [2, Type.INT], // Maximum files to upload in parallel
|
|
1854
|
+
allowMinimumUploadDuration: [true, Type.BOOLEAN], // if true uploads take at least 750 ms, this ensures the user sees the upload progress giving trust the upload actually happened
|
|
1854
1855
|
|
|
1855
1856
|
// Chunks
|
|
1856
1857
|
chunkUploads: [false, Type.BOOLEAN], // Enable chunked uploads
|
|
@@ -3221,7 +3222,7 @@ const createPerceivedPerformanceUpdater = (
|
|
|
3221
3222
|
};
|
|
3222
3223
|
};
|
|
3223
3224
|
|
|
3224
|
-
const createFileProcessor = processFn => {
|
|
3225
|
+
const createFileProcessor = (processFn, options) => {
|
|
3225
3226
|
const state = {
|
|
3226
3227
|
complete: false,
|
|
3227
3228
|
perceivedProgress: 0,
|
|
@@ -3234,6 +3235,8 @@ const createFileProcessor = processFn => {
|
|
|
3234
3235
|
response: null,
|
|
3235
3236
|
};
|
|
3236
3237
|
|
|
3238
|
+
const { allowMinimumUploadDuration } = options;
|
|
3239
|
+
|
|
3237
3240
|
const process = (file, metadata) => {
|
|
3238
3241
|
const progressFn = () => {
|
|
3239
3242
|
// we've not yet started the real download, stop here
|
|
@@ -3273,7 +3276,7 @@ const createFileProcessor = processFn => {
|
|
|
3273
3276
|
},
|
|
3274
3277
|
// random delay as in a list of files you start noticing
|
|
3275
3278
|
// files uploading at the exact same speed
|
|
3276
|
-
getRandomNumber(750, 1500)
|
|
3279
|
+
allowMinimumUploadDuration ? getRandomNumber(750, 1500) : 0
|
|
3277
3280
|
);
|
|
3278
3281
|
|
|
3279
3282
|
// remember request so we can abort it later
|
|
@@ -4743,7 +4746,10 @@ const actions = (dispatch, query, state) => ({
|
|
|
4743
4746
|
chunkForce: options.chunkForce,
|
|
4744
4747
|
chunkSize: options.chunkSize,
|
|
4745
4748
|
chunkRetryDelays: options.chunkRetryDelays,
|
|
4746
|
-
})
|
|
4749
|
+
}),
|
|
4750
|
+
{
|
|
4751
|
+
allowMinimumUploadDuration: query('GET_ALLOW_MINIMUM_UPLOAD_DURATION'),
|
|
4752
|
+
}
|
|
4747
4753
|
),
|
|
4748
4754
|
// called when the file is about to be processed so it can be piped through the transform filters
|
|
4749
4755
|
(file, success, error) => {
|