I have modified demo little bit to use in my Rails application. The plugins works fine in Chrome and FF but have an issue in IE.
In IE(all versions) I select multiple files one by one and starts uploading. The plugin uploads all but one file. If I select single file to upload then nothing happens.
Here is content of main.js
$(function () {
'use strict';
// Initialize the jQuery File Upload widget:
$('#fileupload').fileupload();
// Enable iframe cross-domain access via redirect option:
$('#fileupload').fileupload(
'option',
'redirect',
window.location.href.replace(
/\/[^\/]*$/,
'/cors/result.html?%s'
)
);
//Reference :
// https://github.com/blueimp/jQuery-File-Upload/issues/1324
// https://github.com/blueimp/jQuery-File-Upload/issues/841
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
var inputs = data.context.find(':input');
if (inputs.filter('[required][value=""]').first().focus().length) {
return false;
}
data.formData = inputs.serializeArray();
});
$('#fileupload').bind('fileuploadadd', function (e, data) {
alert('file added');
});
$('#fileupload').fileupload('option', {
url: '/gallery',
maxFileSize: 5000000,
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
process: [
{
action: 'load',
fileTypes: /^image\/(gif|jpeg|png)$/,
maxFileSize: 20000000 // 20MB
},
{
action: 'resize',
maxWidth: 1440,
maxHeight: 900
},
{
action: 'save'
}
]
}).bind('fileuploadstop', function (e, data) {
alert('files uploaded');
});
});
From the demo html I removed all but + Add Files and Start Upload buttons and progress bar related code.
Would anyone please help me to rectify this issue?