forked from leftypol/leftypol
Improved large file size error message.
This commit is contained in:
parent
2eddc7a4ee
commit
455f0c2602
4 changed files with 25 additions and 6 deletions
9
post.php
9
post.php
|
@ -74,8 +74,13 @@
|
|||
$post['filename'] = $_FILES['file']['name'];
|
||||
$post['has_file'] = $OP || !empty($_FILES['file']['tmp_name']);
|
||||
|
||||
if($post['has_file'] && $_FILES['file']['size'] > MAX_FILESIZE)
|
||||
error(ERR_FILSIZE);
|
||||
if($post['has_file']) {
|
||||
$size = $_FILES['file']['size'];
|
||||
if($size > MAX_FILESIZE)
|
||||
error(sprintf3(ERR_FILESIZE, array(
|
||||
'filesz'=>commaize($size),
|
||||
'maxsz'=>commaize(MAX_FILESIZE))));
|
||||
}
|
||||
|
||||
$trip = generate_tripcode($post['name']);
|
||||
$post['name'] = $trip[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue