0 Replies Latest reply on Jul 18, 2007 8:10 PM by qkaibo

    FileReference  bug?

    qkaibo
      code:
      private var _File:FileReference;
      public function Download():void{
      var picReq:URLRequest = new URLRequest" http://localhost/test/test.txt");

      picReq.method = URLRequestMethod.GET;

      picReq.requestHeaders = new Array( new URLRequestHeader("pragma", "no-cache"));
      picReq.data = null;
      picReq.contentType = 'application/octet-stream';
      _File = new FileReference();

      _File.download(picReq);
      }

      when i change "test.txt" content and download
      the first "test.txt" content: "this is the first test"
      after download , i get the download file content:"this is the first test"

      i change "test.txt" content to " this is the another test"
      after download , i get the download file content:"this is the first test"

      i change "test.txt" content to "fdasfafdasfgegrdsghreyhtjhyujgfd"
      after download , i still get the download file content:"this is the first test"

      Another test
      " http://localhost/test/test.jpg"
      where i change "test.jpg " to another image file , but use same name.
      I still get the first image


      !Don't close IE to compleate this test!