forked from leftypol/leftypol
Maximum image dimensions
This commit is contained in:
parent
690f206a63
commit
8849f5a2db
2 changed files with 10 additions and 1 deletions
5
post.php
5
post.php
|
@ -121,6 +121,11 @@
|
|||
error(ERR_INVALIDIMG);
|
||||
}
|
||||
|
||||
if($post['width'] > MAX_WIDTH || $post['height'] > MAX_HEIGHT) {
|
||||
unlink($post['file']);
|
||||
error(ERR_MAXSIZE);
|
||||
}
|
||||
|
||||
$post['filesize'] = filesize($post['file']);
|
||||
$thumb = resize($post['extension'], $post['file'], $post['thumb'], THUMB_WIDTH, THUMB_HEIGHT);
|
||||
$post['thumbwidth'] = $thumb['width'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue