     $scope.initiateUpload = ->
       return unless $scope.readyToUpload()
       $scope.onBeforeUpload?()
+
       xhr   = new XMLHttpRequest()
       form  = new FormData()
       # Append data

        $scope.$apply()
      # Default the method to POST if it was not defined
      $scope.method = 'POST' unless $scope.method?
      # Send it
      xhr.open $scope.method, $scope.url, true
      xhr.send form

    onClickFailureCancel: '=?'
    # Whether we should reset after upload
    resetAfterUpload: '=?'
  controller: ($scope, $timeout, currentUser) ->
    #
    # Accepted upload types with associated data
    #
