private function insertFile($record, array $options = [])
    {
        $record += [
            '_id' => new MongoId(),
            'uploadDate' => new MongoDate(),
            'chunkSize' => $this->defaultChunkSize,
        ];

        $result = $this->insert($record, $options);

        if (! $this->isOKResult($result)) {
            throw new \MongoException('error inserting file');
        }

        return $record;
    }
private function insertFile($record, array $options = [])
    {
        $record += [
            '_id' => new MongoId(),
            'uploadDate' => new MongoDate(),
            'chunkSize' => $this->defaultChunkSize,
        ];

        $result = $this->insert($record, $options);

        if (! $this->isOKResult($result)) {
            throw new \MongoException('error inserting file');
        }

        return $record;
    }
private function insertFile ( $ record , array $ options = [ ] ) { $ record += [ '_id' => new MongoId ( ) , 'uploadDate' => new MongoDate ( ) , 'chunkSize' => $ this -> defaultChunkSize , ] ; $ result = $ this -> insert ( $ record , $ options ) ; if ( ! $ this -> isOKResult ( $ result ) ) { throw new \ MongoException ( 'error inserting file' ) ; } return $ record ; }
Writes a file record to the database

@param $record
@param array $options
@return array
Writes a file record to the database