Skip to content

Commit 29963ec

Browse files
committed
Added replaceFileInput option (default: true), that allows to prevent the replacement of the file input with a reset clone after each change event.
1 parent 5723433 commit 29963ec

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

jquery.fileupload.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Plugin 4.4.3
2+
* jQuery File Upload Plugin 4.5
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -97,7 +97,8 @@
9797
forceIframeUpload: false,
9898
sequentialUploads: false,
9999
maxChunkSize: null,
100-
maxFileReaderSize: 50000000
100+
maxFileReaderSize: 50000000,
101+
replaceFileInput: true
101102
},
102103
documentListeners = {},
103104
dropZoneListeners = {},
@@ -779,8 +780,10 @@
779780
var input = $(e.target),
780781
form = $(e.target.form);
781782
if (form.length === 1) {
782-
input.data(defaultNamespace + '_form', form);
783-
replaceFileInput(input);
783+
if (settings.replaceFileInput) {
784+
input.data(defaultNamespace + '_form', form);
785+
replaceFileInput(input);
786+
}
784787
} else {
785788
form = input.data(defaultNamespace + '_form');
786789
}

0 commit comments

Comments
 (0)