내 레일 애플리케이션에서 사용하기 위해 demo을 약간 수정했습니다. 플러그인은 Chrome 및 FF에서 제대로 작동하지만 IE에는 문제가 있습니다.jQuery blueimp 파일 업로드 : IE의 서버에 N - 1 개의 파일 업로드
IE (모든 버전)에서 하나씩 여러 파일을 선택하고 업로드를 시작합니다. 플러그인은 하나의 파일을 제외한 모든 파일을 업로드합니다. 업로드 할 단일 파일을 선택하면 아무 일도 일어나지 않습니다. 여기
는 main.js 내가 모두 제거 데모 HTML에서
$(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');
});
});
의 내용이지만, + 파일 및 업로드 시작 버튼과 진행률 표시 줄과 관련된 코드를 추가합니다.
누구든지이 문제를 해결할 수 있도록 도와 주시겠습니까?