1

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

Chinthaka
  • 966
  • 1
  • 13
  • 42
  • http://www.lonhosford.com/lonblog/2010/07/29/adobe-air-native-drag-and-drop-file-upload-with-progressbar-and-php/ this link will be help full – Triode Mar 19 '12 at 14:44
  • Thanks for the comments. I am afraid this is not working. – Chinthaka Mar 19 '12 at 17:54

0 Answers0