Table of Contents

Method Upload

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

Upload(Stream, string)

Uploads a GridFS file.

public MongoGridFSFileInfo Upload(Stream stream, string remoteFileName)

Parameters

stream Stream

The source stream.

remoteFileName string

The remote file name.

Returns

MongoGridFSFileInfo

The file info of the new GridFS file.

Upload(Stream, string, MongoGridFSCreateOptions)

Uploads a GridFS file.

public MongoGridFSFileInfo Upload(Stream stream, string remoteFileName, MongoGridFSCreateOptions createOptions)

Parameters

stream Stream

The source stream.

remoteFileName string

The remote file name.

createOptions MongoGridFSCreateOptions

The create options.

Returns

MongoGridFSFileInfo

The file info of the new GridFS file.

Upload(string)

Uploads a GridFS file.

public MongoGridFSFileInfo Upload(string fileName)

Parameters

fileName string

The file name (same local and remote names).

Returns

MongoGridFSFileInfo

The file info of the new GridFS file.

Upload(string, string)

Uploads a GridFS file.

public MongoGridFSFileInfo Upload(string localFileName, string remoteFileName)

Parameters

localFileName string

The local file name.

remoteFileName string

The remote file name.

Returns

MongoGridFSFileInfo

The file info of the new GridFS file.