Table of Contents

Method UploadFromStream

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

UploadFromStream(TFileId, string, Stream, GridFSUploadOptions, CancellationToken)

Uploads a file (or a new revision of a file) to GridFS.

public void UploadFromStream(TFileId id, string filename, Stream source, GridFSUploadOptions options = null, CancellationToken cancellationToken = default)

Parameters

id TFileId

The file id.

filename string

The filename.

source Stream

The source.

options GridFSUploadOptions

The options.

cancellationToken CancellationToken

The cancellation token.