This should be an update/comment to @jquery-guru's answer but as I don't have enough rep it will go here. It fixes the errors that are now generated by the code.
https://jsfiddle.net/vzhrqotw/
The change is basically:
FileUploadCtrl.$inject = ['$scope']
function FileUploadCtrl(scope) {
To:
app.controller('FileUploadCtrl', function($scope)
{
Feel free to move to a more appropriate location if desired.