       Meteor.setTimeout ((parts, i) ->
         return () ->
           part = parts[i]
-          # console.log "Upload part#", part
           fileReader = new FileReader
-          # console.log "Slice file to parts: #{index}"
           upload(file.slice(part.from, part.to), i + 1, part.chunksQty, fileReader)
       )(parts, i)
       ,


        i = 0
        binary = ''
        # console.log file.byteLength
        while i < file.byteLength
          binary += String.fromCharCode(file.buffer[i])
          i++

        last = (chunksQty * partsQty <= totalSentChunks)
        # console.log "LAST", last, chunksQty * partsQty, totalSentChunks

        cleanName = (str) ->
          str.replace(/\.\./g, '').replace /\//g, ''


      fileReader.onload = (chunk) ->
        ++totalSentChunks
        onProgress and onProgress((uploaded / file.size) * 100)

        uploaded   += self.chunkSize
        binary      = chunk.srcElement or chunk.target
        arrayBuffer = new Uint8Array binary.result
        last        = (part is streams and currentChunk >= chunksQtyInPart)


        if chunksQtyInPart is 1
          Meteor.call self.methodNames.MeteorFileWrite, arrayBuffer, fileData, meta, first, chunksQtyInPart, currentChunk, totalSentChunks, randFileName, part, streams, file.size, (error, data) ->
