我正在使用fineuploader 将大型视频文件上传到我的服务器。它在除 IE8 - IE9 之外的所有浏览器上都能完美运行。文件开始上传,但随后几乎“永远”继续上传并且没有完成。
它在 IE 上适用于较小的文件(受最大 PHP 帖子大小的限制)。有没有办法阻止这种情况或为 IE8-9 用户提供某种错误消息?
我正在考虑将最大发布文件大小设置为巨大的......但不确定这是否对服务器有任何性能问题?
非常感谢任何帮助。到目前为止,我的代码如下:
<script src="fineuploader/jquery.fineuploader-3.7.0.js"></script>
<script>
var fileCount = 0;
var addedFiles = 0;
var fileLimit = 1;
$(document).ready(function() {
//Hide Submit button until video has finished uploading
$('#submit').hide();
$('#uploadmessage').hide();
var filelimituploader = new qq.FineUploader({
element: $('#filelimit-fine-uploader')[0],
request: {
endpoint: 'processfile/example.php'
},
retry: {
enableAuto: true
},
chunking: {
enabled: true
},
resume: {
enabled: true
},
validation: {
allowedExtensions: ['png','jpg','jpeg','gif','mp4','avi','mov','mpg','flv','m4v'],
sizeLimit: 199229440
},
callbacks: {
onSubmit: function(id, fileName) {
$('#uploadmessage').show();
fileCount ++;
if(fileCount > fileLimit) {
$('#filelimit-fine-uploader .qq-upload-button').hide();
$('#filelimit-fine-uploader .qq-upload-drop-area').hide();
return false;
}
},
onCancel: function(id, fileName) {
$('#uploadmessage').hide();
fileCount --;
if(fileCount <= fileLimit) {
$('#filelimit-fine-uploader .qq-upload-button').show();
}
},
onComplete: function(id, fileName, responseJSON) {
if (responseJSON.success) {
addedFiles ++;
if(addedFiles >= fileLimit) {
$('#filelimit-fine-uploader .qq-upload-button').hide();
$('#filelimit-fine-uploader .qq-upload-drop-area').hide();
//$('#filenamehere').html(responseJSON.uploadName);
$('#filen').val(responseJSON.uploadName);
$('#submit').show();
$('#uploadmessage').hide();
}
}
}
}
});
});
</script>