Incorrect variable when calling callback in JS
<p>I am getting the wrong filename in the following code. I'm sure its obvious what the mistake is but i dont see it. I get the correct amount of errors however all the filename are the same rather then the filename in error.</p>

<pre><code>for(var i=0; i&lt;this.files.length; ++i){
    var f = this.files[i];
    var reader = new FileReader();
    reader.onload = function(e) {
        if(e.total&gt;maxFilesize){
            tooBigFilesLs.push(f.name);
</code></pre>
