 
 UPLOAD_CHUNK_SIZE = 128 * 1024 # bytes
 DRAGGING_OVER_DOM = false
+
 importingFiles = {}
 
 # Observes files that are processed and removes them from dictionary
-processedFiles = ImportingFile.documents.find()
+processedFiles = ImportingFile.documents.find {}
 processedFiles.observeChanges
   removed: (id) ->
     delete importingFiles[id]
-
 
 verifyFile = (file, publicationId, samples) ->
   ImportingFile.documents.update file._id,


# Process next element from import queue
Deps.autorun ->
  document = ImportingFile.documents.findOne
    finished: false
    errored: false


        ImportingFile.documents.update document._id,
          $set:
            sha256: sha256
            status: "In import queue"

  # TODO: Read file in chunks
  reader.readAsArrayBuffer importingFiles[document._id]

importFile = (file) ->
  id = Random.id()
