Click or drag to resize

GridFSBucket<TFileId>.DownloadToStreamByName Method

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

Namespace:  MongoDB.Driver.GridFS
Assembly:  MongoDB.Driver.GridFS (in MongoDB.Driver.GridFS.dll) Version: 2.7.3+Branch.v2.7.x.Sha.2f1f2be13a23b8520cb9c2ee8439c022f9a03efe
Syntax
public void DownloadToStreamByName(
	string filename,
	Stream destination,
	GridFSDownloadByNameOptions options = null,
	CancellationToken cancellationToken = null
)

Parameters

filename
Type: System.String
The filename.
destination
Type: System.IO.Stream
The destination.
options (Optional)
Type: MongoDB.Driver.GridFS.GridFSDownloadByNameOptions
The options.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
The cancellation token.

Implements

IGridFSBucket<TFileId>.DownloadToStreamByName(String, Stream, GridFSDownloadByNameOptions, CancellationToken)
See Also