         @form.htmlElement.submit()
 
     upload: ->
-        @fireEvent('start', @)
+        abort = @fireEvent('start', @)
+        if abort
+            console.log 'aborted'
+            return
         if browserInfo.supportsXhrFileUpload()
             @uploadXHR()
         else

        @fireEvent('fieldChange', @)

    _onUploadStart: (args...) =>
        @fireEvent('uploadStart', @, args...)

    _setupDragEvents: ->
        @dropTargetElement.on('dragover', @_onDragOver)

            filename = filepath.split('/').pop().split('\\').pop()
            filenames.push(filename)
        return filenames

    hasMultipleFiles: ->
        return @getFilenames().length > 1

    getFileInfo: ->
        fileinfo = []
