           continue
         reader = new FileReader
         reader.onloadend = do (file=files[index])=> (readEvent)=>
+
+          fileName = file.fileName or file.name
+
+          if file.relativePath
+            return if @_uploaded[file.relativePath + fileName]
+            @_uploaded[file.relativePath + fileName] = yes
+
           if @getOptions().uploadToVM
-            fsFile = @upload file.name, readEvent.target.result
+            fsFile = @upload fileName, readEvent.target.result, file.relativePath
+
           @emit "dropFile",
             origin  : "external"
-            filename: file.name
+            filename: fileName
+            path    : file.relativePath or no
             instance: fsFile
             content : readEvent.target.result
             isLast  : file is lastFile

      filePath   = "[#{fsFile.vmName}]#{fsFile.path}"
      parentPath = "[#{fsFile.vmName}]#{fsFile.parentPath}"

      bindAbort = ->
        nodeView.showProgressView 1
        nodeView.once "abortProgress", => fsFile.abort yes

      fsFile._isBeingUploaded = yes
      nodeView = @finder.treeController.nodes[filePath]
      if nodeView
      then bindAbort()
      else
        @finder.treeController.on "NodeWasAdded", (nodeView)->
          if nodeView.getData().path is filePath and fsFile._isBeingUploaded
            bindAbort()

        fsFile.save "", =>
          @finder.expandFolders FSHelper.getPathHierarchy parentPath

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

  viewAppended: ->
    super

  saveFile: (fsFile, data)->
    @emit "uploadStart", fsFile
    fsFile.saveBinary data, (err, res, progress)=>
      progress = res unless progress
      return if err
      if res.finished
        @emit "uploadEnd", fsFile
