     # files are processed immediately.
     # Receives `file`
     processing: (file) ->
-      file.previewElement.classList.add "dz-processing"
-      file._removeLink.textContent = @options.dictCancelUpload if file._removeLink
+      if file.previewElement
+        file.previewElement.classList.add "dz-processing"
+        file._removeLink.textContent = @options.dictCancelUpload if file._removeLink
     
     processingmultiple: noop
     

    addedfile: (file) ->
      @element.classList.add "dz-started" if @element == @previewsContainer

      file.previewElement = Dropzone.createElement @options.previewTemplate.trim()
      file.previewTemplate = file.previewElement # Backwards compatibility

      @previewsContainer.appendChild file.previewElement
      node.textContent = file.name for node in file.previewElement.querySelectorAll("[data-dz-name]")
      node.innerHTML = @filesize file.size for node in file.previewElement.querySelectorAll("[data-dz-size]")

      if @options.addRemoveLinks
        file._removeLink = Dropzone.createElement """<a class="dz-remove" href="javascript:undefined;" data-dz-remove>#{@options.dictRemoveFile}</a>"""
        file.previewElement.appendChild file._removeLink

      removeFileEvent = (e) =>
        e.preventDefault()
        e.stopPropagation()
        if file.status == Dropzone.UPLOADING
          Dropzone.confirm @options.dictCancelUploadConfirmation, => @removeFile file
        else
          if @options.dictRemoveFileConfirmation
            Dropzone.confirm @options.dictRemoveFileConfirmation, => @removeFile file
          else
            @removeFile file

      removeLink.addEventListener "click", removeFileEvent for removeLink in file.previewElement.querySelectorAll("[data-dz-remove]")
        

    # Called whenever a file is removed.
    removedfile: (file) ->
      file.previewElement?.parentNode.removeChild file.previewElement
      @_updateMaxFilesReachedClass()

    # Called when a thumbnail has been generated
    # Receives `file` and `dataUrl`
    thumbnail: (file, dataUrl) ->
      file.previewElement.classList.remove "dz-file-preview"
      file.previewElement.classList.add "dz-image-preview"
      for thumbnailElement in file.previewElement.querySelectorAll("[data-dz-thumbnail]")
        thumbnailElement.alt = file.name
        thumbnailElement.src = dataUrl

    
    # Called whenever an error occurs
    # Receives `file` and `message`
    error: (file, message) ->
      file.previewElement.classList.add "dz-error"
      message = message.error if typeof message != "String" and message.error
      node.textContent = message for node in file.previewElement.querySelectorAll("[data-dz-errormessage]")
    
    errormultiple: noop
    

      # Remove the fallback
      fallback.parentNode.removeChild fallback

    # Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false
    if @options.previewsContainer != false
      if @options.previewsContainer
        @previewsContainer = Dropzone.getElement @options.previewsContainer, "previewsContainer"
      else
        @previewsContainer = @element

    if @options.clickable
      if @options.clickable == yes
