> The form is correctly submitted to the server, which sends the right > JSON response back. But I never get that result: instead the browsers > pops up a window telling me it does not know how to handle > application/json and if I want to save the response. This is not quite > what I had in mind.
That happens because the file upload logic directs the server response to an iframe. If the response mimetype is application/json it will trigger the issue you described in certain browsers. If you drop that content-type header on the response you should be fine. Mike