   # Called internally when processing is finished.
   # Individual callbacks have to be called in the appropriate sections.
   errorProcessing: (file, message, xhr) ->
-    @filesProcessing = without(@filesProcessing, file)
-    file.processing = no # Backwards compatibility
     file.status = Dropzone.ERROR
     @processQueue()
     @emit "error", file, message, xhr

    @clickableElements = [ ]
    @listeners = [ ]
    @files = [] # All files
    @acceptedFiles = [] # All files that are actually accepted
    @filesQueue = [] # The files that still have to be processed
    @filesProcessing = [] # The files currently processed

    @element = document.querySelector @element if typeof @element == "string"


  # Goes through the queue and processes files if there aren't too many already.
  processQueue: ->
    parallelUploads = @options.parallelUploads
    processingLength = @getUploadingFiles().length
    i = processingLength

    queuedFiles = @getQueuedFiles()
    while i < parallelUploads
      return unless queuedFiles.length # Nothing left to process
      @processFile queuedFiles.shift()
      i++


  # Loads the file, then calls finishedLoading()
  processFile: (file) ->
    file.processing = yes # Backwards compatibility
    file.status = Dropzone.UPLOADING

