Truncated response on DataEvent.UPLOAD_COMPLETE_DATA
Hello,
We are developing an mobile AIR application, using the Flex 4.6 SDK, which uploads a file to a server and then relies on getting some information (the upload’s ID) from the server’s response.
It all works fine when running through the AIR simulator, but when we run the app on an iPhone or an iPad, the server’s response after the upload has finished seems truncated.
We weren’t sure where the response might get truncated, so we tried Wireshark to compare the packets that come back from the server for a “good” and for a truncated response and they seem to be exactly the same in size.
This is an example code of what we’re trying to do:
public function uploadFileToServer( _filePath : String ) : void
{
var file : File = new File( _filePath );
var requestText : String = “...”;
var request : URLRequest = new URLRequest( requestText );
request.method = URLRequestMethod.POST;
request.contentType = "multipart/form-data";
file.addEventListener( DataEvent.UPLOAD_COMPLETE_DATA, handleFileUploadComplete );
file.upload( request, "File1" );
}
in handleFileUploadComplete is where the DataEvent’s data is truncated on a mobile device, but not when the application runs through the simulator.
The “good” response isn’t large and is no more than 130 symbols. On a mobile device it always gets truncated to 48 symbols.
Assuming that the server sends exactly the same response each time (or so it seems when looking at the communication with Wireshark), is there a way to track what happens to it between its arrival and what comes in on the DataEvent.UPLOAD_COMPLETE_DATA event?
Thank you in advance.
DiaDraw.com
