Method OpenDownloadStream

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver.GridFS

Assembly

MongoDB.Driver.dll

OpenDownloadStream(BsonValue, GridFSDownloadOptions, CancellationToken)

Opens a Stream that can be used by the application to read data from a GridFS file.

public GridFSDownloadStream OpenDownloadStream(BsonValue id, GridFSDownloadOptions options = null, CancellationToken cancellationToken = default)

Parameters

id BsonValue

The file id.

options GridFSDownloadOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

GridFSDownloadStream

A Stream.