Method DownloadAsBytes
DownloadAsBytes(TFileId, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and returns it as a byte array.
byte[] DownloadAsBytes(TFileId id, GridFSDownloadOptions options = null, CancellationToken cancellationToken = default)
Parameters
idTFileIdThe file id.
optionsGridFSDownloadOptionsThe options.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- byte[]
The contents of the file stored in GridFS.