Click here to Skip to main content
15,912,977 members

Comments by TimWatson123 (Top 2 by date)

TimWatson123 26-Sep-11 10:17am View    
Yeah ive tried that, it didnt work.

If I call Request.TotalBytes before returning the error code it works. The only problem is that TotalBytes hangs until the full file has been uploaded to the server. For some reason I only receive readyStates 1 and 4 when returning before uploading. I think this is my main problem:

"responseText of type DOMString
If the readyState attribute has a value other than 3 (Receiving) or 4 (Loaded), it must be the empty string. Otherwise, it must be the the body of the data received so far, interpreted using the character encoding specified in the response, or UTF-8 if no character encoding was specified. Invalid bytes must be converted to U+FFFD REPLACEMENT CHARACTER."
http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/#dfn-readystate

Am I trying to set the response text when the readyState is not 3 or 4? If so is there a way of causing the readyState to change to 3 or 4 server side before setting the response text?
TimWatson123 26-Sep-11 9:46am View    
I dont receive a readyState == 3 when returning the error before I have uploaded the file, only after I have uploaded the file. But I do receive a readyState == 1 and the status is [Exception: DOMException]. Any ideas why?