Table of Contents

Method OpenUploadStreamAsync

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

OpenUploadStreamAsync(TFileId, string, GridFSUploadOptions, CancellationToken)

Opens a Stream that can be used by the application to write data to a GridFS file.

Task<GridFSUploadStream<TFileId>> OpenUploadStreamAsync(TFileId id, string filename, GridFSUploadOptions options = null, CancellationToken cancellationToken = default)

Parameters

id TFileId

The file id.

filename string

The filename.

options GridFSUploadOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<GridFSUploadStream<TFileId>>

A Task whose result is a Stream.