PDA

View Full Version : File Upload using Ext.data.connection().request()



saran-kumar
11 Feb 2008, 4:52 AM
Hi,

I am just trying to upload a file using the connection.request() object. See the code below is used.

conn.request({
url: /ajaxjsps/SubmitActivityAjaxStep2.jsp',
params: 'cid='+cid+'&activityid='+aid+'&type=before',
method: "POST",
isUpload: true,
form: file,
headers: {'Content-type':'multipart/form-data'}
});
function processResult(response) {
var json = Ext.util.JSON.decode(response.responseText);
alert(json[0].error);
}

*Could upload file successfully but as the response is /ajaxjsps/SubmitActivityAjaxStep2.jsp' this jsp file getting download.
* callback function not called.
*If I save and open the aboce jsp file then I could see my response text there.



I dont know why it is like that.

Any help would be helpful for me a ltot. Thanks...

dawesi
14 Feb 2008, 1:33 PM
file upload does not return a response in the current state (2.0.1). You can fire another connection to check with your system if it was ok.

Other extensions are available if you need feedback from your process