public function __construct(CollectionWrapper $collectionWrapper, stdClass $file)
{
$this->file = $file;
$this->chunksIterator = $collectionWrapper->getChunksIteratorByFilesId($this->file->_id);
$this->numChunks = $file->length >= 0 ? ceil($file->length / $file->chunkSize) : 0;
$this->initEmptyBuffer();
}