Method DownloadAsBytesAsync
DownloadAsBytesAsync(BsonValue, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and returns it as a byte array.
public Task<byte[]> DownloadAsBytesAsync(BsonValue id, GridFSDownloadOptions options = null, CancellationToken cancellationToken = default)
Parameters
id
BsonValueThe file id.
options
GridFSDownloadOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.