How to upload file using EXTJS ?
I am using Action class on the backend to upload file..Can anyone help how to deal with it ?
How to upload file using EXTJS ?
I am using Action class on the backend to upload file..Can anyone help how to deal with it ?
1. Put a FileUploadField on your form.
2. Configure your form with fileUpload:true.
3. Configure your server so it can handle multi-part uploads.
I'm applying fileUpload:true property to form but it is giving systax error and i am not able to fetch the whole path of the file.
Here is my code.
Ext.onReady(function(){
var uploadfile=new Ext.form.FileUploadField(
{
name: 'FilePath',
emptyText: 'Select File',
fieldLabel: 'Upload File',
width:200,
buttonText: 'Browse'
});
var uploadForm=new Ext.FormPanel({
name:'uploadForm',
id:'uploadForm',
fileUpload:true,
renderTo: document.body,
title:'Upload Form',
autoHeight:true,
width:400,
items:[uploadfile],
buttons: [{
text: 'Save',
handler: function(){
uploadForm.getForm().submit({url: 'UploadFile.action'});
}
}]
});
});
Syntax error where?
ps. Some browsers don't allow access to the file path - Nothing you can do about that.
uploadForm.getForm().submit({url: 'UploadFile.action'});
in this statement..
And what is the error?
A bit more information please!
Which line number in ext-all-debug.js or other file (and which Ext version number)?
Error is on linenumber 7389 in ext-all-debug.js and m using ext3.2.1 version.
Line 7389 is in the middle of the Date parsing code! You are not using dates in this example, so that makes no sense what soever!