     getCurrentFileFieldElement: ->
         return @_getCurrentFileField()?.htmlElement
 
+    pause: ->
+        @paused = true
+        @fireEvent('pause', @)
+
+    resume: ->
+        @paused = false
+        @fireEvent('resume', @)
+
     upload: (files) ->
+        if @paused
+            throw "Can not upload while paused."
         old = @current
         helper = new AsyncFileUploader({
             formElement: @getCurrentFormElement()

        @form.htmlElement.submit()

    upload: ->
        @fireEvent('start', @)
        if browserInfo.supportsXhrFileUpload()
            @uploadXHR()
        else

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

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

    getFileInfo: ->
        fileinfo = []
