我一直试图使用ExtJS通过WCF上传文件,这里是我的代码片段
browseFile = new Ext.ux.form.FileUploadField({
id: form-file ,
name: BrowseFile ,
fieldLabel: Browse ,
allowBlank: false,
maxLength: 8000,
emptyText:
});
添加到表单并使用fileupload:true属性,但未能将字节流传递到WCF服务层
formPanel.getForm().submit(
{
url: svc/ + entityService + / + (isNewRecord ? Create : Update ),
waitMsg: Please wait... ,
waitTitle: Submiting data ,
params:
{
fileData: Ext.getDom( form-file ).getValue()
},