Skip to main content
The ValidationFileSize type is used for blob options that need to validate a blob is at least a specified size, or no larger than a specified size. Sizes are specified by combining a size floating point number with a size unit. For example, 10 KiB can be specified as:
size = { size = 10.0, unit = "KiB" }
This will result in a size of 10,240 bytes.

Units

UnitNameSize in Bytes
bBYTE1
KiBKIBIBYTE1,024
MiBMEBIBYTE1,048,576
GiBGIBIBYTE1,073,741,824
TiBTEBIBYTE1,099,511,627,776
kBKILOBYTE1,000
MBMEGABYTE1,000,000
GBGIGABYTE1,000,000,000
TBTERABYTE1,000,000,000,000
The size will be rounded to the nearest byte.