public function insertFile($file) { if (!$this->checkedIndexes) { $this->ensureIndexes(); } $this->filesCollection->insertOne($file); }