Skip to content

Commit 1e9436b

Browse files
committed
fix file input selector
1 parent caae21b commit 1e9436b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

jquery.form.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Form Plugin
3-
* version: 3.19 (19-NOV-2012)
3+
* version: 3.20 (20-NOV-2012)
44
* @requires jQuery v1.5 or later
55
*
66
* Examples and documentation at: http://malsup.com/jquery/form/
@@ -172,7 +172,11 @@ $.fn.ajaxSubmit = function(options) {
172172
};
173173

174174
// are there files to upload?
175-
var fileInputs = $('input[type=file]:enabled[value]', this); // [value] (issue #113)
175+
176+
// [value] (issue #113), also see comment:
177+
// https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
178+
var fileInputs = $('input[type=file]:enabled[value!=""]', this);
179+
176180
var hasFileInputs = fileInputs.length > 0;
177181
var mp = 'multipart/form-data';
178182
var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);

0 commit comments

Comments
 (0)