Ext 文件上传 fileuploadfield 帮帮忙 急呀
帮帮忙 给我写出后台的代码吧 给提示也行 我不知道后台怎么接收
我要保存 文件名 和文件路径 当然文件也是肯定要保存的。帮帮忙
前台代码我已经写好了
我要保存 文件名 和文件路径 当然文件也是肯定要保存的。帮帮忙
前台代码我已经写好了
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'
}
}],
buttons: [{
text: 'Save',
handler: function(){
var v = Ext.getCmp('formFile').getValue();
alert(v);
if(fp.getForm().isValid()){
fp.getForm().submit({
url: "/common/common_fileLoad.action",
method:'POST',
waitMsg: 'Uploading your photo...',
success: function(fp, o){
msg('Success', 'Processed file "'+o.result.file+'" on the server');
}
});
}
}
},{
text: 'Reset',
handler: function(){
fp.getForm().getEl().dom.reset();
}
}]
});
});
...全文
相关推荐
Extjs的FileUploadField文件上传出现了两个上传按钮
同时,理解并掌握FileUploadField的使用方式和相关配置,可以更好地实现文件上传功能,并确保用户体验。
FileUploadField.js
extjs 实现文件上传时必需的js文件,FileUploadField.js
EXT3.0 JSP上传
EXT3.0提供了多种组件,如FormPanel、FileUploadField等,可以帮助我们构建一个用户友好的文件上传界面。
ext上传文件
标题中的“ext上传文件”可能指的是使用EXTJS(一个JavaScript库)进行文件上传的功能。
Extjs upload(ext官网例子)
在给定的"Extjs upload(ext官网例子)"中,我们关注的是一个特定的功能——文件上传。


