0 Replies Latest reply on Nov 3, 2010 12:56 AM by Resmi Adhal

    file uploading problem

    Resmi Adhal

      Hi

       

      I used the following code for file upload.

       

      private function startUpload():void {
                                     
                      if (_arrUploadFiles.length > 0) {
                          disableUI();Alert
                                           
                          listFiles.selectedIndex = _numCurrentUpload;
                          scrollFiles();
                                              set_uploadUrl("http://localhost:8080/Project1/Upload");
                          // Variables to send along with upload
                          var sendVars:URLVariables = new URLVariables();
                          sendVars.action = "upload";
                                          
                          var request:URLRequest = new URLRequest();
                          request.data = sendVars;
                          request.url = _strUploadUrl;
                          request.method = URLRequestMethod.POST;
                          _refUploadFile = new FileReference();
                          _refUploadFile = listFiles.selectedItem.file;
                                         
                          _refUploadFile.addEventListener(ProgressEvent.PROGRESS, onUploadProgress);
                                             
                             _refUploadFile.addEventListener(Event.COMPLETE, onUploadComplete);
                                            
                          _refUploadFile.addEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
                            _refUploadFile.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
                          _refUploadFile.upload(request, "file", false);
                                          
                      }
                  }

       

       

       

       

       

       

       

      But I am getting an error

       

      Error #2044: Unhandled uploadIOError:. text=Error #2038: File I/O Error. URL: http://localhost:8080/xNetP/Upload

       

      Please help me.

       

       

      Regards

      Resmi