private function insertChunksFromBytes($bytes, $record)
    {
        $chunkSize = $record['chunkSize'];
        $fileId = $record['_id'];
        $i = 0;

        $chunks = str_split($bytes, $chunkSize);
        foreach ($chunks as $chunk) {
            $this->insertChunk($fileId, $chunk, $i++);
        }
    }