Method OpenDownloadStreamAsync
OpenDownloadStreamAsync(BsonValue, GridFSDownloadOptions, CancellationToken)
Opens a Stream that can be used by the application to read data from a GridFS file.
public Task<GridFSDownloadStream> OpenDownloadStreamAsync(BsonValue id, GridFSDownloadOptions options = null, CancellationToken cancellationToken = default)
Parameters
id
BsonValueThe file id.
options
GridFSDownloadOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<GridFSDownloadStream>
A Task whose result is a Stream.