Method DownloadToStreamAsync
DownloadToStreamAsync(BsonValue, Stream, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and writes the contents to a stream.
public Task DownloadToStreamAsync(BsonValue id, Stream destination, GridFSDownloadOptions options = null, CancellationToken cancellationToken = default)
Parameters
idBsonValueThe file id.
destinationStreamThe destination.
optionsGridFSDownloadOptionsThe options.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
A Task.