     e.preventDefault()
     Session.set 'loginOverlayActive', false
 
+Template.uploadOverlay.created = ->
+  @_amountOfImports = 0
+
 Template.uploadOverlay.events =
   'dragover': (e, template) ->
     e.preventDefault()

              'importing.uploadProgress':
                $lt: 1
            ).count() == 0
              Meteor.Router.to '/p/' + publicationId

      reader.readAsArrayBuffer file


    unless Meteor.user()
      Session.set 'uploadOverlayActive', false
      return

    template._amountOfImports += e.dataTransfer.files.length

    _.each e.dataTransfer.files, (file) ->

