Skip to content

Commit 8e27059

Browse files
author
Ravishanker Kusuma
committed
formData() option is added, useful in multiple file upload
1 parent 1f1770a commit 8e27059

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

jquery.form.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,16 @@ $.fn.ajaxSubmit = function(options) {
314314
s.data = null;
315315
var beforeSend = s.beforeSend;
316316
s.beforeSend = function(xhr, o) {
317-
o.data = formdata;
317+
/*
318+
for multiple file upload, we don't get individual progress for each file.
319+
I am splitting the file upload. So I need option in plugin to send FormData().
320+
*/
321+
if (options.formData)
322+
{
323+
o.data = options.formData;
324+
} else {
325+
o.data = formdata;
326+
}
318327
if(beforeSend)
319328
beforeSend.call(this, xhr, o);
320329
};

0 commit comments

Comments
 (0)