Table of Contents

Struct BOBChunkContext

Namespace
BlazOrbit.Components.Forms
Assembly
BlazOrbit.dll

One chunk emitted by BOBChunkedUploader. The Data buffer is owned by the uploader and only guaranteed valid for the duration of the SendChunk callback's awaitable — do not retain it past the callback's return.

public readonly struct BOBChunkContext

Constructors

BOBChunkContext(string, string, long, int, int, long, ReadOnlyMemory<byte>)

One chunk emitted by BOBChunkedUploader. The Data buffer is owned by the uploader and only guaranteed valid for the duration of the SendChunk callback's awaitable — do not retain it past the callback's return.

public BOBChunkContext(string FileName, string ContentType, long FileSize, int Index, int TotalChunks, long Offset, ReadOnlyMemory<byte> Data)

Parameters

FileName string

The originating file's display name.

ContentType string

The originating file's MIME type.

FileSize long

Total size of the originating file in bytes.

Index int

Zero-based chunk index.

TotalChunks int

Total chunks the uploader will emit for this file.

Offset long

Byte offset within the file where Data starts.

Data ReadOnlyMemory<byte>

The chunk payload. Length is always <= ChunkSize; the final chunk is short whenever FileSize is not a multiple of ChunkSize.

Properties

ContentType

The originating file's MIME type.

public string ContentType { get; init; }

Property Value

string

Data

The chunk payload. Length is always <= ChunkSize; the final chunk is short whenever FileSize is not a multiple of ChunkSize.

public ReadOnlyMemory<byte> Data { get; init; }

Property Value

ReadOnlyMemory<byte>

FileName

The originating file's display name.

public string FileName { get; init; }

Property Value

string

FileSize

Total size of the originating file in bytes.

public long FileSize { get; init; }

Property Value

long

Index

Zero-based chunk index.

public int Index { get; init; }

Property Value

int

Offset

Byte offset within the file where Data starts.

public long Offset { get; init; }

Property Value

long

TotalChunks

Total chunks the uploader will emit for this file.

public int TotalChunks { get; init; }

Property Value

int