Limit upload to 5MB

This commit is contained in:
root
2022-10-28 10:35:33 +02:00
parent 3b2afcd94c
commit ef29e4cfc8
3 changed files with 169 additions and 178 deletions

View File

@@ -28,8 +28,8 @@ class Upload extends Controller
// Valid File Extensions
$valid_extension = array("jpg","jpeg","png");
// 2MB in Bytes
$maxFileSize = 2097152;
// 4MB in Bytes
$maxFileSize = 5000000;
// Check file extension
if(in_array(strtolower($extension),$valid_extension)){
@@ -54,7 +54,7 @@ class Upload extends Controller
$image->save( $thumbdir.'/'.$bckfile);
echo 'Upload Successful.';
}else{
echo 'File too large. File must be less than 2MB.';
echo 'File too large. File must be less than 5MB.';
}
}else{