File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1277,7 +1277,12 @@ export default class Dropzone extends Emitter {
1277
1277
} ;
1278
1278
1279
1279
if ( this . options . parallelChunkUploads ) {
1280
- for ( let i = 0 ; i < file . upload . totalChunkCount ; i ++ ) {
1280
+ // we want to limit parallelChunkUploads to the same value as parallelUploads option
1281
+ const parallelCount = Math . min (
1282
+ this . options . parallelChunkUploads === true ? this . options . parallelUploads : this . options . parallelChunkUploads ,
1283
+ file . upload . totalChunkCount
1284
+ ) ;
1285
+ for ( let i = 0 ; i < parallelCount ; i ++ ) {
1281
1286
handleNextChunk ( ) ;
1282
1287
}
1283
1288
} else {
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ let defaultOptions = {
65
65
66
66
/**
67
67
* If `true`, the individual chunks of a file are being uploaded simultaneously.
68
+ * The limit of concurrent connections is governed by `parallelUploads`.
68
69
*/
69
70
parallelChunkUploads : false ,
70
71
You can’t perform that action at this time.
0 commit comments