On File Added event

I want to add one more event onFileAdded such that I can use the names of files selected in a list to show which files are going to be uploaded. I made these edits to make that work. In the html I added an attribute on-file-added="onFileAdded(file)" however it fires with an undefined file value. Can you see what I'm doing wrong? Is there any other way to get access to the file list before uploading? Does this look like a useful feature to add?
Found the fix

Had to return a Javascript object with key file to pass the correct value. Fixed.
Added functionality to xhr-svc-integration.html
Fixed

Oops. I copied the $scope.error function definition down but forgot to change the name of the new function to fileAdded. Done now.
Merge pull request #7 from sujeetpillai/patch-1

On File Added event