日期:2014-05-16  浏览次数:20341 次

Ext 文件上传 fileuploadfield 帮帮忙 急呀
本帖最后由 fixed_2008 于 2011-04-06 15:13:31 编辑
帮帮忙 给我写出后台的代码吧 给提示也行  我不知道后台怎么接收
我要保存 文件名 和文件路径 当然文件也是肯定要保存的。帮帮忙
前台代码我已经写好了



Ext.onReady(function(){

    Ext.QuickTips.init();

    var msg = function(title, msg){
        Ext.Msg.show({
            title: title,
            msg: msg,
            minWidth: 200,
            modal: true,
            icon: Ext.Msg.INFO,
            buttons: Ext.Msg.OK
        });
    };

    var fp = new Ext.FormPanel({
        renderTo: 'fi-form',
        fileUpload: true,
        width: 500,
        frame: true,
        title: 'File Upload Form',
        autoHeight: true,
        bodyStyle: 'padding: 10px 10px 0 10px;',
        labelWidth: 50,
        defaults: {
            anchor: '95%',
            msgTarget: 'side'
        },
        items: [{
            xtype: 'textfield',
            fieldLabel: 'Name',
            name:"common.name",
            id:"fileName"
        },{
            xtype: 'fileuploadfield',
            id: 'formFile',
            emptyText: 'Select an image',
            fieldLabel: 'Photo',
            name: 'common.fileStr',
            fileUpload : true,
            buttonText: '',
            buttonCfg: {
                iconCls: 'upload-icon'
            }
        }],
        butt