chore(web/problem/submit): set default size limit to 100KB
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-12-25 09:35:52 +08:00
parent 35eb4c170c
commit 10ccb26815
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -735,7 +735,7 @@ function newSubmissionForm($form_name, $requirement, $zip_file_name_gen, $handle
$stat = $zip_file->statName($req['file_name']); $stat = $zip_file->statName($req['file_name']);
if ($req['type'] == 'source code') { if ($req['type'] == 'source code') {
$max_size = isset($req['size']) ? (int)$req['size'] : 50; $max_size = isset($req['size']) ? (int)$req['size'] : 100;
if ($stat['size'] > $max_size * 1024) { if ($stat['size'] > $max_size * 1024) {
$zip_file->close(); $zip_file->close();
unlink(UOJContext::storagePath() . $zip_file_name); unlink(UOJContext::storagePath() . $zip_file_name);