private function insertChunk($fileId, $data, $chunkNumber)
    {
        $chunk = [
            'files_id' => $fileId,
            'n' => $chunkNumber,
            'data' => new MongoBinData($data),
        ];

        $result = $this->chunks->insert($chunk);

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

        return $result;
    }
private function insertChunk($fileId, $data, $chunkNumber)
    {
        $chunk = [
            'files_id' => $fileId,
            'n' => $chunkNumber,
            'data' => new MongoBinData($data),
        ];

        $result = $this->chunks->insert($chunk);

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

        return $result;
    }
private function insertChunk ( $ fileId , $ data , $ chunkNumber ) { $ chunk = [ 'files_id' => $ fileId , 'n' => $ chunkNumber , 'data' => new MongoBinData ( $ data ) , ] ; $ result = $ this -> chunks -> insert ( $ chunk ) ; if ( ! $ this -> isOKResult ( $ result ) ) { throw new \ MongoException ( 'error inserting chunk' ) ; } return $ result ; }
Inserts a single chunk into the database

@param mixed $fileId
@param string $data
@param int $chunkNumber
@return array|bool
Inserts a single chunk into the database