views:

616

answers:

1

We have got an extjs 3.1.1 form with file upload field (http://www.extjs.com/deploy/dev/examples/form/file-upload.html from here, the latest). After successful submission the reply is {"success":true} with application/json content type. We use Zend Framework as backend, json is generated with json helper.

This works like a charm in firefox but in explorer offers downloading a file. The saved file contains the successful json reply. If we remove the file upload field, everything works. But this way (naturally) the form is not multitype. Beside this we have bunch of other forms (without multipart) that works with the same json reply method.

The only way that we managed to do upload submission with explorer was to remove the content type and to respond with plain text that contained a valid json.

Is thery any way to handle multipart form json reply properly with explorer?

+1  A: 

yes it can work in explorer. (works like a charm with ExtJs+SWFupload for example)

looks related to your response headers, can you check ? should always be text/plain or test/javascript only.

jujule
We always use application/json for content type.
Hubidubi
do you have any other headers ?? (check with fiddler for IE)
jujule
You don't want to use application/json instead use text/plain
sdavids