     @checkAccess = (http) ->
       if @protected
         user = false
-        userFuncs = @getUser()
+        userFuncs = @getUser http
         {user, userId} = userFuncs
         user = user()
 

            if @onPause.get() then @continue() else @pause()
          progress: new ReactiveVar 0
          abort: () ->
            onAbort and onAbort.call file, fileData
            @pause()
            Meteor.call self.methodNames.MeteorFileAbort, randFileName, streams, file


      if file
        console.time('insert') if @debug

        beforeunload = (e) ->
          message = if _.isFunction(self.onbeforeunloadMessage) then self.onbeforeunloadMessage.call(null) else self.onbeforeunloadMessage
          e.returnValue = message if e
          return message
        window.addEventListener "beforeunload", beforeunload, false

        self    = @
        result  =
          onPause: new ReactiveVar false
