     {Number|dynamic} streams     - Quantity of parallel upload streams, default: 2
     {Number|dynamic} chunkSize   - Chunk size for upload
     {Function}    onUploaded     - Callback triggered when upload is finished, with two arguments `error` and `fileRef`
-    {Function}    onError        - Callback triggered on error in upload and/or FileReader, with two arguments `error` and `fileRef`
+    {Function}    onError        - Callback triggered on error in upload and/or FileReader, with two arguments `error` and `fileData`
     {Function}    onProgress     - Callback triggered when chunk is sent, with only argument `progress`
-    {Function}    onBeforeUpload - Callback triggered right before upload is started, with only `FileReader` argument:
-        context is `File` - so you are able to check for extension, mime-type, size and etc.
+    {Function}    onBeforeUpload - Callback triggered right before upload is started:
         return true to continue
         return false to abort upload
   @description Upload file to server over DDP

            files.splice sindex, 1 if !!~sindex
            findex = files.indexOf "#{opts.fileId}_#{num}#{extensionWithDot}"
            if !!~findex
              files.splice(findex, 1)
            else
              console.warn "[Meteor.Files] [Write Method] [concatChunks] finish as no more file's chunks", files, {sindex, findex}, "#{opts.fileId}_#{num}#{extensionWithDot}" if self.debug
              return finish cb

            _path   = "#{pathName}_#{num}#{extensionWithDot}"
            _source = pathName + '_1' + extensionWithDot


        pathName = if self.public then "#{self.storagePath}/original-#{opts.fileId}" else "#{self.storagePath}/#{opts.fileId}"
        path     = if self.public then "#{self.storagePath}/original-#{opts.fileId}#{extensionWithDot}" else "#{self.storagePath}/#{opts.fileId}#{extensionWithDot}"
        pathPart = if opts.fileLength > 1 then "#{pathName}_#{opts.chunkId}#{extensionWithDot}" else null

        result = _.extend self.dataToSchema(_.extend(opts.file, {path, extension, name: fileName, meta: opts.meta})), {_id: opts.fileId}

        action = (cb) -> Meteor.defer ->
          if opts.eof
