       progress or= res
       return if err
       if res.finished
-        @emit "uploadEnd", fsFile
+        @emit 'uploadEnd', fsFile
       else if res.abort
-        @emit "uploadAbort", fsFile
+        @emit 'uploadAbort', fsFile
       else
-        @emit "uploadFile", fsFile, progress.percent
+        @emit 'uploadProgress', { file: fsFile, progress }
+
 
   upload: (fileName, contents, relativePath)->
 

      click     : => @emit "cancel"

  saveFile: (fsFile, data) ->
    @emit "uploadStart", fsFile
    fsFile.saveBinary data, (err, res, progress)=>

      log "Upload result:", err, res, progress

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

    KD.singletons.mainController.ready @bound 'reset'

