TFileSize

type
Form & Input

Controls whether and how file sizes are displayed in <OrigamFileField>. Accepts a boolean toggle or a numeric unit divisor (1000 for SI units, 1024 for binary units).

TypeScript

Definition

The TypeScript definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Accepted

Values

Accepted string literal values for this type. Click a value to copy it.

false
File sizes are not displayed. This is the default behaviour when the showSize prop is omitted.
true
File sizes are displayed using the SI divisor (1 000) — KB, MB, GB.
1000
Explicit SI (decimal) units: 1 KB = 1 000 bytes, 1 MB = 1 000 000 bytes. Matches the marketing convention used by most storage providers.
1024
Binary / IEC units: 1 KiB = 1 024 bytes, 1 MiB = 1 048 576 bytes. Traditional computing convention; more accurate for OS-reported file sizes.

Ecosystem

Used by

Components and props that accept this type as a value.

Usage

Examples

Ready-to-paste code snippets using this type.

Show size with SI units (default)

html

Show size with binary / IEC units

html