I'm trying to execute the following code, but it gives me this error:

$http.post('/api/updatePhoto/'+$scope.item.id)
$scope.onFileSelect = function($files) {
for (var i = 0; i < $files.length; i++) {
var file = $files[i];
$scope.upload = $upload.upload({
$http.post('/api/updatePhoto/'+$scope.item.id)
data: {myObj: $scope.myModelObj},
file: file,
})
}).success(function(data){
alert(data);
})
}
What's wrong with the code?