File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 23
23
* @param {string|Function } [opts.testMethod]
24
24
* @param {string|Function } [opts.uploadMethod]
25
25
* @param {bool } [opts.prioritizeFirstAndLastChunk]
26
+ * @param {bool } [opts.allowDuplicateUploads]
26
27
* @param {string|Function } [opts.target]
27
28
* @param {number } [opts.maxChunkRetries]
28
29
* @param {number } [opts.chunkRetryInterval]
82
83
testMethod : 'GET' ,
83
84
uploadMethod : 'POST' ,
84
85
prioritizeFirstAndLastChunk : false ,
86
+ allowDuplicateUploads : false ,
85
87
target : '/' ,
86
88
testChunks : true ,
87
89
generateUniqueIdentifier : null ,
574
576
// Uploading empty file IE10/IE11 hangs indefinitely
575
577
// see https://connect.microsoft.com/IE/feedback/details/813443/uploading-empty-file-ie10-ie11-hangs-indefinitely
576
578
// Directories have size `0` and name `.`
577
- // Ignore already added files
579
+ // Ignore already added files if opts.allowDuplicateUploads is set to false
578
580
if ( ( ! ie10plus || ie10plus && file . size > 0 ) && ! ( file . size % 4096 === 0 && ( file . name === '.' || file . fileName === '.' ) ) &&
579
- ! this . getFromUniqueIdentifier ( this . generateUniqueIdentifier ( file ) ) ) {
581
+ ( this . opts . allowDuplicateUploads || ! this . getFromUniqueIdentifier ( this . generateUniqueIdentifier ( file ) ) ) ) {
580
582
var f = new FlowFile ( this , file ) ;
581
583
if ( this . fire ( 'fileAdded' , f , event ) ) {
582
584
files . push ( f ) ;
You can’t perform that action at this time.
0 commit comments