Table of Contents

Class FileEntity<T>

Namespace
MongoDB.Entities
Assembly
MongoDB.Entities.dll

Inherit this base class in order to create your own File Entities

public abstract class FileEntity<T> : Entity, IEntity where T : FileEntity<T>, new()

Type Parameters

T
Inheritance
FileEntity<T>
Implements
Inherited Members
Extension Methods

Properties

ChunkCount

The number of chunks that have been created so far

[BsonElement]
public int ChunkCount { get; }

Property Value

int

FileSize

The total amount of data in bytes that has been uploaded so far

[BsonElement]
public long FileSize { get; }

Property Value

long

Md5

If this value is set, the uploaded data will be hashed and matched against this value. If the hash is not equal, an exception will be thrown by the UploadAsync() method.

public string? Md5 { get; set; }

Property Value

string

UploadSuccessful

Returns true only when all the chunks have been stored successfully in mongodb

[BsonElement]
public bool UploadSuccessful { get; }

Property Value

bool

Methods

Data(DB)

Access the DataStreamer class for uploading and downloading data

public DataStreamer<T> Data(DB database)

Parameters

database DB

The database instance to use for this operation

Returns

DataStreamer<T>