         reader.onloadend = do (file=files[index])=> (readEvent)=>
           if @getOptions().uploadToVM
             fsFile = @upload file.name, readEvent.target.result
-
           @emit "dropFile",
             origin  : "external"
             filename: file.name

      lastFile = files.last
      for file, index in files
        sizeInMb = file.size/1024/1024
        if sizeInMb > 50 && @getOptions().uploadToVM
          new KDNotificationView
            type    : "tray"
            title   : "File is too big to upload!"

      @on "dragleave", => @unsetClass "hover"
      @on "drop",      => @unsetClass "hover"

    @on "uploadFile", (fsFile, percent)=>
      finder = KD.getSingleton "finderController"
      filePath  = "[#{fsFile.vmName}]#{fsFile.path}"
      finder.treeController.nodes[filePath]?.updateProgressView percent

    @on "uploadStart", (fsFile)=>
      finder = KD.getSingleton "finderController"
      filePath   = "[#{fsFile.vmName}]#{fsFile.path}"
      parentPath = "[#{fsFile.vmName}]#{fsFile.parentPath}"

      fsFile._isBeingUploaded = yes
      nodeView = finder.treeController.nodes[filePath]
      if nodeView
        nodeView.updateProgressView 1
        nodeView.on "abortProgress", => fsFile.abort yes
      else
        finder.treeController.on "NodeWasAdded", (nodeView)->
          if nodeView.getData().path is filePath and fsFile._isBeingUploaded
            nodeView.updateProgressView 1
            nodeView.on "abortProgress", => fsFile.abort yes

        fsFile.save "", -> finder.revealPath parentPath

    @on "uploadEnd", (fsFile)->
      fsFile._isBeingUploaded = no

  reset: ->
    {uploadToVM, defaultPath, title} = @getOptions()
