     method: "post"
     withCredentials: no
     parallelUploads: 2
+    uploadMultiple: no # Whether to send multiple files in one request.
     maxFilesize: 256 # in MB
     paramName: "file" # The name of the file param that gets transferred.
     createImageThumbnails: true

  # set to CANCELED.
  cancelUpload: (file) ->
    if file.status == Dropzone.UPLOADING
      file.status = Dropzone.CANCELED
      file.xhr.abort()
    else if file.status in [ Dropzone.ADDED, Dropzone.ACCEPTED, Dropzone.QUEUED ]
      file.status = Dropzone.CANCELED

    @emit "complete", file

    @processQueue()

  uploadFile: (file) ->
    xhr = new XMLHttpRequest()

    # Put the xhr object in the file object to be able to reference it later.
    file.xhr = xhr

    xhr.open @options.method, @options.url, true


    response = null

    handleError = =>
      for file in files
        @errorProcessing file, response || @options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr


    updateProgress = (e) =>
      if e?
        progress = 100 * e.loaded / e.total

        for file in files
          file.upload =
            progress: progress
            total: e.total
            bytesSent: e.loaded
      else
        # Called when the file finished uploading

        allFilesFinished = yes

        progress = 100

        for file in files
          allFilesFinished = no unless file.upload.progress == 100 and file.upload.bytesSent == file.upload.total
          file.upload.progress = progress
          file.upload.bytesSent = file.upload.total

        # Nothing to do, all files already at 100%
        return if allFilesFinished

      for file in files
        @emit "uploadprogress", file, progress, file.upload.bytesSent

    xhr.onload = (e) =>
      return if files[0].status == Dropzone.CANCELED

      return unless xhr.readyState is 4

