Hi Everyone!
I run a photo competition, where the winning photos will be made into a Calendar.
In config you can set what the maximim file size is, but I'd like to be able to set a minimum, too.
I've found the file that checks that the image being uploaded is not larger than it should be, in
db_input.php
// Check that picture size (in pixels) is lower than the maximum allowed
if (max($imginfo[0], $imginfo[1]) > $CONFIG['max_upl_width_height']) {
$max = $CONFIG['max_upl_width_height'];
// cpg_die(ERROR, sprintf($lang_db_input_php['err_fsize_too_large'], $CONFIG['max_upl_width_height'], $CONFIG['max_upl_width_height']), __FILE__, __LINE__);
// Check that picture file size is lower than the maximum allowed
} else {
$max = max($imginfo[0], $imginfo[1]);
}
if (!resize_image($uploaded_pic, $uploaded_pic, $max, $CONFIG['thumb_method'], '')) {
@unlink($uploaded_pic);
cpg_die(ERROR, "This is not a image or image has errors", __FILE__, __LINE__);
}
$imginfo = getimagesize($uploaded_pic);
if (filesize($uploaded_pic) > ($CONFIG['max_upl_size'] << 10)) {
@unlink($uploaded_pic);
cpg_die(ERROR, sprintf($lang_db_input_php['err_imgsize_too_large'], $CONFIG['max_upl_size']), __FILE__, __LINE__);
Is there any way to make a version of max_upl_width_height option in config that is min_upl_width_height so that ONLY photos larger than 1280 pixels wide will be successfully uploaded?
Thanks in advance for any help,
Vanessa