+ -
当前位置:首页 → 问答吧 → uploadify上传插件的奇怪问题

uploadify上传插件的奇怪问题

时间:2011-12-14

来源:互联网

在项目中使用uploadify上传插件时,有时上传正常,有时需要再次刷新整个页面才能正常上传,诸位遇到过这样的问题吗?是怎么解决的?
我用的asp.net,调用代码如下:
JScript code

$("#uploadAdjunctAdd").uploadify({
        'uploader': '../../Scripts/uploadify/uploadify.swf?var=' + new Date().getTime(),
        'script': '../../Service/ArticleUpload.ashx?action=adjunct&rand=' + new Date().getTime(),
        'cancelImg': '../../Scripts/uploadify/cancel.png',
        'auto': false,
        'queueID': 'fileQueueAdjunctAdd',
        'multi': false,
        'simUploadLimit': '3',
        'fileExt': adjExt,
        'fileDesc': '请选择文件',
        'buttonImg': '../../Scripts/uploadify/browse.png',
        'buttonText': '浏览',
        'width': '80',
        'height': '18',
        'wmode': 'transparent',
        'removeCompleted': true,
        'sizeLimit': 1024 * 1024 * 4,
        'onError': function (event, id, fileObj, errorObj) {
            switch (errorObj.type) {
                case 'File Size':
                    $.messager.alert('错误', '上传的文件太大,不能超过4M!', 'error');
                    break;
                case 'HTTP':
                    $.messager.alert('错误', 'HTTP错误,请更改文件名或者稍候刷新页面再试!', 'error');
                    break;
                default:
            }
        },
        'onComplete': function (event, queueID, fileObj, response) {
            if (response != "0") {
                $('#txtAdjunct').val(response);
            } else {
                $.messager.alert('错误', '文件上传出错!', 'error');
            }
        }
    });

作者: ThisIsXp   发布时间: 2011-12-14

没有吗?

作者: ThisIsXp   发布时间: 2011-12-14