我对精细上传器(3.0)有一个奇怪的问题,它适用于除 ie9 之外的所有浏览器。
没有js错误,只是上传一个0byte失败。我正在使用 valums php,但在这里失败了:
$realSize = stream_copy_to_stream($input, $temp);
fclose($input);
//This results in an error in ie9
if ($realSize != $this->getSize()){
return false;
}
如果我评论返回它会创建一个 0 字节的文件,看起来 ie9 没有发送任何数据。你们中有人知道可能是什么问题吗?
非常感谢你。
编辑:
根据需要的客户端代码:
if($('#fine-uploader_main').length > 0){
var method = $('#fine-uploader_main_method').val();
var fileCount = 0;
$('#fine-uploader_main').fineUploader({
request: {
endpoint: base_url+"ajax/"+method,//base_url+'ajax/upload_afile/can_id/'+$('#fine-uploader-can_id').val(),
},
text: {
uploadButton: '<i class="icon-upload icon-white"></i> Upload'
},
template: '<div class="qq-uploader span12">' +
'<pre class="qq-upload-drop-area span12"><span>{dragZoneText}</span></pre>' +
'<div class="qq-upload-button btn btn-success" style="width: auto;">{uploadButtonText}</div>' +
'<span class="qq-drop-processing"><span>{dropProcessingText}</span><span class="qq-drop-processing-spinner"></span></span>' +
'<ul class="qq-upload-list" style="margin-top: 10px; text-align: center;"></ul>' +
'</div>',
classes: {
success: 'alert alert-success',
fail: 'alert alert-error'
}
}).on('complete', function(event, id, fileName,response) {
if(response.success==true){
$.ajax({
type: "POST", url: base_url+"ajax/"+method+"_return",data:"filename="+response.filename,
success: function(html){
$("#uploader_container").hide();
$("#uploader_success").html(html).show();
$("#fileupload-check").removeClass('required');
}
});
} else {
//console.log(response);
}
});
}