Validates that sizeInBytes doesn't exceed maxSizeInBytes.
The limit maxSizeInBytes is always supplied by the caller, since what's an
acceptable maximum asset size is a platform-specific decision.
Pass 0 for maxSizeInBytes to fall back to the default DEFAULT_MAX_SIZE_IN_BYTES.
Parameters
sizeInBytes: number
Size of the asset, in bytes.
maxSizeInBytes: number
Maximum allowed size, in bytes, or 0 to use the default.
Returns void
Throws
If sizeInBytes or maxSizeInBytes isn't a finite, non-negative number.
Validates that
sizeInBytesdoesn't exceedmaxSizeInBytes.The limit
maxSizeInBytesis always supplied by the caller, since what's an acceptable maximum asset size is a platform-specific decision. Pass0formaxSizeInBytesto fall back to the default DEFAULT_MAX_SIZE_IN_BYTES.