(
file: File,
options: ZipValidationOptions = {}
)
| 77 | * Validate a local archive file by checking its size. |
| 78 | */ |
| 79 | export function validateZipFile( |
| 80 | file: File, |
| 81 | options: ZipValidationOptions = {} |
| 82 | ): ZipValidationResult { |
| 83 | const sizeLimit = options.sizeLimit ?? ARCHIVE_SIZE_LIMIT; |
| 84 | return validateArchiveSize(file.size, sizeLimit); |
| 85 | } |
| 86 | |
| 87 | function validateArchiveSize(size: number, sizeLimit: number): ZipValidationResult { |
| 88 | if (size > sizeLimit) { |
no test coverage detected