File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 * @param {string|Function } [opts.testMethod]
2424 * @param {string|Function } [opts.uploadMethod]
2525 * @param {bool } [opts.prioritizeFirstAndLastChunk]
26+ * @param {bool } [opts.allowDuplicateUploads]
2627 * @param {string|Function } [opts.target]
2728 * @param {number } [opts.maxChunkRetries]
2829 * @param {number } [opts.chunkRetryInterval]
8283 testMethod : 'GET' ,
8384 uploadMethod : 'POST' ,
8485 prioritizeFirstAndLastChunk : false ,
86+ allowDuplicateUploads : false ,
8587 target : '/' ,
8688 testChunks : true ,
8789 generateUniqueIdentifier : null ,
568570 // Uploading empty file IE10/IE11 hangs indefinitely
569571 // see https://connect.microsoft.com/IE/feedback/details/813443/uploading-empty-file-ie10-ie11-hangs-indefinitely
570572 // Directories have size `0` and name `.`
571- // Ignore already added files
573+ // Ignore already added files if opts.allowDuplicateUploads is set to false
572574 if ( ( ! ie10plus || ie10plus && file . size > 0 ) && ! ( file . size % 4096 === 0 && ( file . name === '.' || file . fileName === '.' ) ) &&
573- ! this . getFromUniqueIdentifier ( this . generateUniqueIdentifier ( file ) ) ) {
575+ ( opts . allowDuplicateUploads || ! this . getFromUniqueIdentifier ( this . generateUniqueIdentifier ( file ) ) ) ) {
574576 var f = new FlowFile ( this , file ) ;
575577 if ( this . fire ( 'fileAdded' , f , event ) ) {
576578 files . push ( f ) ;
You can’t perform that action at this time.
0 commit comments