FileUpload Form-Post - How to send errors to the client
Hi Sencha Team,
as stated by the Ext-Direct Documentation (http://www.sencha.com/products/extjs/extdirect) a Form-Post response should also always contain the following information:
But what can we do in case that the Server receives a large file-upload ?
- type – ‘rpc’
- tid – The transaction id that has just been processed
- action – The class/action that has just been processed
- method – The method that has just been processed
- result – The result of the method call
The server will receive the POST-Request from the Client as a multipart form message in the following order:
artID 100005 (user-parameter)
artmediaid -1 (user-parameter)
upload 3ffsdofwfdskfdk..... (file-upload)
extTID 38 (generated by ext)
extAction ArtImage (generated by ext)
extMethod upload (generated by ext)
extType rpc (generated by ext)
extUpload true (generated by ext)
the server should stop parsing the file upload if it is too large. But therefore the server can not read out the extAction-, extMethod-Parts because they come after the upload-Part. Therefore the server can not send a valid response to the client that contains 'action', 'method' and 'tid'....
Is there any known way the server can send an error code to the client for too large file uploads?
If the server does not send any response to the client, the client will wait forever an can not inform the user about the problem.
thanks for any info to this,