我正在使用 Uploadify,而以前可以使用的东西现在不可用,我不知道为什么。每当我单击上传时,都会返回 HTTP 错误。在 Firefox 中查看 net 选项卡,它看起来甚至没有再次向服务器发送任何内容。
我尝试放入错误函数来帮助调试,但状态属性未定义..
$("#fileInput").uploadify({
'uploader': '/scripts/upload/uploadify.swf',
'script': '/Member/UploadImages/PerformUpload',
'cancelImg': '/scripts/upload/cancel.png',
'multi': true,
'simUploadLimit': 1,
'fileDesc': "Images",
'fileExt': "*.jpg;*. jpeg;*.bmp;*.png",
'sizeLimit': 3000000,
'onAllComplete':showFinishedLink,
'onError': function (event, queueID ,fileObj, errorObj) {
var msg;
if (errorObj.status == 404) {
alert('Could not find upload script. Use a path relative to: '+'<?= getcwd() ?>');
msg = 'Could not find upload script.';
} else if (errorObj.type === "HTTP")
msg = errorObj.type+": "+errorObj.status;
else if (errorObj.type ==="File Size")
msg = fileObj.name+'<br>'+errorObj.type+' Limit: '+Math.round(errorObj.sizeLimit/1024)+'KB';
else
msg = errorObj.type+": "+errorObj.text;
alert(msg);
$("#fileUpload" + queueID).fadeOut(250, function() { $("#fileUpload" + queueID).remove()});
return false;
},
});
有任何想法吗?