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
| Unit | Name | Size in Bytes |
|---|
| b | BYTE | 1 |
| KiB | KIBIBYTE | 1,024 |
| MiB | MEBIBYTE | 1,048,576 |
| GiB | GIBIBYTE | 1,073,741,824 |
| TiB | TEBIBYTE | 1,099,511,627,776 |
| kB | KILOBYTE | 1,000 |
| MB | MEGABYTE | 1,000,000 |
| GB | GIGABYTE | 1,000,000,000 |
| TB | TERABYTE | 1,000,000,000,000 |
The size will be rounded to the nearest byte.