Table of Contents

Method DownloadToStream

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

DownloadToStream(BsonValue, Stream, GridFSDownloadOptions, CancellationToken)

Downloads a file stored in GridFS and writes the contents to a stream.

public void DownloadToStream(BsonValue id, Stream destination, GridFSDownloadOptions options = null, CancellationToken cancellationToken = default)

Parameters

id BsonValue

The file id.

destination Stream

The destination.

options GridFSDownloadOptions

The options.

cancellationToken CancellationToken

The cancellation token.