8 Replies Latest reply on Feb 22, 2011 12:38 AM by piersh

    File Upload IOErrorEvent 2038

    Fernando Geraldo Mantoan Level 1

      Hello guys, how are you? I'm developing a system, and in my file uploads there are some cases that this error is throwed. For example, when the user is behind a proxy, this error would occur. I don't know what to do, i rechecked my upload script, which is Java based, and it's fine. There are a lot of machines which the error isn't throwed, but in other cases it happens.

       

      Here's what ObjectUtil.toString() of the IOErrorEvent object shows to me:

       

      (flash.events::IOErrorEvent)#0
        bubbles = false
        cancelable = false
        currentTarget = (flash.net::FileReference)#1
          creationDate = Mon Jan 24 07:57:40 GMT-0200 2011
          creator = (null)
          data = (flash.utils::ByteArray)#2
            bytesAvailable = 3401
            endian = "bigEndian"
            length = 3401
            objectEncoding = 3
            position = 0
          modificationDate = Mon Jan 24 07:57:37 GMT-0200 2011
          name = "enum.png"
          size = 3401
          type = ".png"
        errorID = 0
        eventPhase = 2
        target = (flash.net::FileReference)#1
        text = "Error #2038"
        type = "ioError"
      

       

      Is there any better description about this error? Or any thoughts? Here is a snippet of my code:

       

      public function upload():void
      {
           this.urlRequest.data = new URLVariables();
           this.urlRequest.data.externalPath = this.externalPath;
           this.urlRequest.data.externalId = this.externalId;
           this.urlRequest.data.folder = this.folder;
           this.urlRequest.data.application = this.application.toString();
                
           this.fileReference.upload( urlRequest );
      }
      public function get fileReference():FileReference
      {
           return this._fileReference;
      }
      public function set fileReference( value:FileReference ):void
      {
           this._fileReference = value;
                     
           if ( fileReference )
           {
                this.urlRequest = new URLRequest( "http://myapplication.com/medias" );
                this.urlRequest.method = URLRequestMethod.POST;
                this.urlRequest.requestHeaders = [new URLRequestHeader("Content-Type", "application/json")];
           }
      }
      

       

      The weird thing is that just in some circumstances that this error is throwed...

       

      I wish i can get some help.

       

      Regards.