Class FileEntity<T>
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
FileSize
The total amount of data in bytes that has been uploaded so far
[BsonElement]
public long FileSize { get; }
Property Value
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
UploadSuccessful
Returns true only when all the chunks have been stored successfully in mongodb
[BsonElement]
public bool UploadSuccessful { get; }
Property Value
Methods
Data(DB)
Access the DataStreamer class for uploading and downloading data
public DataStreamer<T> Data(DB database)
Parameters
databaseDBThe database instance to use for this operation
Returns
- DataStreamer<T>