View Full Version : FomPanel with fileupload: true does not care for HTTP-Status

28 Aug 2009, 4:35 AM

i have a problem using a FormPanel with fileupload: true. When the server (maybe because of network problems) returns a response with HTTP-Status != 200, which does not include a JSON-encoded answer, ext nevertheless tries (in the class ext.data.Connection in method doFormUpload() in function cb()) to convert the response to JSON and fails with an javascript-error. The problem is, that my failure-callback is never called, when the error occurs(and so I can not inform the user of the problem).

Has anybody a suggestion for working around this problem? I am also not sure if this behaviour should be classified as bug or as request for enhancement?


28 Aug 2009, 5:43 AM
Failure callback can only be called when there is a successful HTTP response.

It uses an iframe to load the response into with load listener on it. If the load listener never gets fire because the response was not success, you're stuffed. You have to return 200.