MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / validateArchiveSize

Function validateArchiveSize

src/utils/zipValidation.ts:87–97  ·  view source on GitHub ↗
(size: number, sizeLimit: number)

Source from the content-addressed store, hash-verified

85}
86
87function validateArchiveSize(size: number, sizeLimit: number): ZipValidationResult {
88 if (size > sizeLimit) {
89 return {
90 valid: false,
91 size,
92 error: formatArchiveSizeError(size, sizeLimit),
93 };
94 }
95
96 return { valid: true, size };
97}
98
99function formatArchiveSizeError(size: number, sizeLimit: number): string {
100 const sizeMB = (size / (1024 * 1024)).toFixed(1);

Callers 2

validateZipUrlFunction · 0.85
validateZipFileFunction · 0.85

Calls 1

formatArchiveSizeErrorFunction · 0.85

Tested by

no test coverage detected