max size for windows platform 200

This commit is contained in:
Gleb Bahmutov
2017-10-05 10:19:09 -04:00
parent b7ed773c1a
commit d1e74603a5

View File

@@ -39,7 +39,8 @@ checkZipSize = (zipPath) ->
stats = fs.statSync(zipPath)
zipSize = filesize(stats.size, {round: 0})
console.log("zip file size #{zipSize}")
MAX_ZIP_FILE_SIZE = megaBytes(200)
MAX_ALLOWED_SIZE_MB = if os.platform() == "win32" then 200 else 120
MAX_ZIP_FILE_SIZE = megaBytes(MAX_ALLOWED_SIZE_MB)
if stats.size > MAX_ZIP_FILE_SIZE
throw new Error("Zip file is too large: #{zipSize}")