Table of Contents

Method OpenDownloadStreamByNameAsync

Namespace
MongoDB.Driver.GridFS
Assembly
MongoDB.Driver.dll

OpenDownloadStreamByNameAsync(string, GridFSDownloadByNameOptions, CancellationToken)

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

Task<GridFSDownloadStream<TFileId>> OpenDownloadStreamByNameAsync(string filename, GridFSDownloadByNameOptions options = null, CancellationToken cancellationToken = default)

Parameters

filename string

The filename.

options GridFSDownloadByNameOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<GridFSDownloadStream<TFileId>>

A Task whose result is a Stream.