I want upload file without reload page. My server-side is ASP.NET MVC.
Ext.Ajax.request(
{
form: f,
url: 'http://localhost/Mvc/file/create',
method: 'POST',
isUpload: true
}
I know that fileupload not work with ajax. ExtJS do it with IFRAME
After get response ext-all try decode it. If type of action is ActionResult or EmptyResult then fire error, if type of action is JsonResult then Internet Explorer try save json-response as file.
How I must do ajax-style fileupload with ExtJS without show dialog save json and without error?
Best wishes,
Evgeniy.
I solved my trouble.
The server response is parsed by the browser to create the document for the IFRAME. If the server is using JSON to send the return object, then the Content-Type header must be set to “text/html” in order to tell the browser to insert the text unchanged into the document body.