I am trying to upload a video from an AIR app to a server. All the
examples I have seen use the fileReference.browse, but I don't need to
browse any directory.

I am using RED5 to capture a video to the local hard drive. 
I know that the name and path of the file. Thus, the question is how I
write the upload stuff. I am trying this:

private function uploadTheFile():void
            {
                var fileToUpload:File = new File(path+"captureTest.flv");
            
fileToUpload.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA,
onUploadComplete);
                
                var uploadRequest:URLRequest = new URLRequest();
                uploadRequest.method = "POST";
                uploadRequest.url = myURL;
                
                try{
                        fileToUpload.upload(uploadRequest);
                }
                catch (error:Error){
                        trace("error uploading the file");
                }
            }

I am getting a I/O Error: Error #2038. 
I would appreciate if someone has an example with the corresponding
PHP script (maybe I have an issue with the PHP script)

Thanks,

Gilbert

Reply via email to