Method DownloadToStreamByNameAsync
DownloadToStreamByNameAsync(string, Stream, GridFSDownloadByNameOptions, CancellationToken)
Downloads a file stored in GridFS and writes the contents to a stream.
public Task DownloadToStreamByNameAsync(string filename, Stream destination, GridFSDownloadByNameOptions options = null, CancellationToken cancellationToken = default)
Parameters
filenamestringThe filename.
destinationStreamThe destination.
optionsGridFSDownloadByNameOptionsThe options.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
A Task.