Extjs中导入文件后缀的设置

来源:互联网 发布:全球高清网络电视直播 编辑:程序博客网 时间:2024/06/13 22:31

废话不说,代码和效果:

    test.uploadAction = new Ext.Button({        text : '导入时刻表信息',        iconCls : 'field',        listeners : {            'click' : function(btn, e) {                new Ext.Window({                    width : 650,                    title : '导入信息',                    height : 300,                    layout : 'fit',                    modal : true,                    items : [ {                        xtype : 'SWFUploader',                        border : false,                        fileSize : 1024 * 550,                        uploadUrl : ctx + '/operate/fileupload',                        flashUrl : ctx + '/resources/swfupload/swfupload.swf',                        filePostName : 'file',                        fileTypes : '*.xls',                        postParams : {                            name : "operate"                        },                        onUploadSuccess : onUploadSuccess                    } ]                }).show();            }        }    });

大家应该注意到了,重点在fileTypes属性上。

0 0
原创粉丝点击