title: HTML5 File API: FileReader object is undefined after an error occured
body: <p>I use Chrome 12 on Mac OS X and I've included jQuery 1.6.1 within the document.</p>
  
  <p>I try to read a File with the following code, an error seams to occur while reading the file, so this.error.onerror() is called, but the FileReader-Object this.reader doesn't exists anymore and I can't get the error. I'm also not sure why the error occurs, it's a regular text document I want to read.</p>
  
  <pre><code>function FileHandler(files, action) {
      console.log('FileHandler called.');
  
      this.files = files;
      this.reader = new FileReader();
      this.action = action;
  
      this.handle = function() {
          console.log('FileHandler.handle called.');
  
          for (var i = 0; i &lt; this.files.length; i++) {
              this.reader.readAsDataURL(files[i]);
          }
      }
  
      this.upload = function() {
          console.log('FileHandler.upload called.');
          console.log(this.reader);
  
          data = {
              content: this.reader.result
          }
  
          console.log(data);
      }
  
      this.error = function() {
          console.log('An error occurred while reading a file.');
          console.log(this.reader.error);
      }
  
      this.reader.onload = this.upload;
      this.reader.onerror = this.error;
  }
  </code></pre>
  
  <p>This code creates the following console output:
  <a href="http://cl.ly/0j1m3j0o3s071Y1K3A25" rel="nofollow">http://cl.ly/0j1m3j0o3s071Y1K3A25</a></p>