I am developing an app for Playbook using Adobe Flex. I need to upload photos and video from playbook to IIS server. I am using file.upload(url)
to upload both medias. This is my code.
private function uploadingProcess(fileName:String):void
{
var file:File = File.applicationStorageDirectory;
file = file.resolvePath("data/"+fileName);
var uploadServerAddress:String = serverAddress;
urlRequest = new URLRequest(uploadServerAddress);
urlRequest.method = URLRequestMethod.POST;
file.addEventListener(Event.COMPLETE, uploadCompleteHandler);
file.addEventListener(SecurityErrorEvent.SECURITY_ERROR, uploadSecurityError);
file.addEventListener(HTTPStatusEvent.HTTP_STATUS, uploadError);
file.addEventListener(IOErrorEvent.IO_ERROR, uploadError);
file.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, serverResponse);
try{
file.upload(urlRequest);
} catch(error:Error){
trace("Uploading error " +error.toString());
}
}
When I try to upload video (mp4) file I am getting following error.
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2038: File I/O Error. URL: http://www.sample.com" errorID=2038]
Both images and video are on same location.
Can anyone please let me know why am I getting this error only the time video upload? thanks