我的 Uploadify 脚本适用于大多数小于 10 MB 的文件。但是一旦文件大小开始超过 40 MB,它将无法上传,只有“HTTP 错误”的错误消息。我尝试为 Uploadify 实现 onError 处理程序,但它没有给我任何详细信息,确切的错误是什么。变量返回“未定义”。我检查了我的 web.config 文件,文件大小限制设置为 50 MB,我的超时时间为 30 分钟,所以我不知道问题出在哪里。这是我的脚本:
$('#uploader').uploadify({
'uploader': '/js/uploadify/uploadify.swf',
'script': '/cms/common/uploadify/UploadHandler.ashx',
'cancelImg': '/images/cancel_upload.png',
'buttonImg': '/images/select_video_thumbnail_en-us.gif',
'auto': true,
'folder': '/Temp',
'multi': false,
'sizeLimit': 0,
'displayData': 'percentage',
'simUploadLimit': 1,
'fileExt': '*.jpg;*.gif;*.png',
'fileDesc': '*.jpg;*.gif;*.png',
'buttonText': 'Select thumbnail...',
'width': '120',
'height': '24',
'onComplete': function (e, queueId, fileObj, response, data)
{
return true;
},
'onError': function (a, b, c, d)
{
if (d.status == 404)
alert('Could not find upload script.');
else if (d.type === "HTTP")
alert('error ' + d.type + ": " + d.status);
else if (d.type === "File Size")
alert(c.name + ' ' + d.type + ' Limit: ' + Math.round(d.sizeLimit / 1024) + 'KB');
else
alert('error ' + d.type + ": " + d.text);
},
'onCancel': function (e, queueId, fileObj, data)
{
}
});