src/Titon/Utility/Validate.php
public static function maxFilesize($input, $max) {
        if (static::file($input)) {
            $size = $input['size'];

        } else if (file_exists($input)) {
            $size = filesize($input);

        } else {
            return false;
        }

        return ($size <= Number::bytesFrom($max));
    }
public static function maxFilesize($input, $max) {
        if (static::file($input)) {
            $size = $input['size'];

        } else if (file_exists($input)) {
            $size = filesize($input);

        } else {
            return false;
        }

        return ($size <= Number::bytesFrom($max));
    }
public static function maxFilesize ( $ input , $ max ) { if ( static :: file ( $ input ) ) { $ size = $ input [ 'size' ] ; } else if ( file_exists ( $ input ) ) { $ size = filesize ( $ input ) ; } else { return false ; } return ( $ size <= Number :: bytesFrom ( $ max ) ) ; }
Validate an images file size is below the maximum.

@uses Titon\Utility\Number

@param array $input
@param int $max
@return bool
Validate an images file size is below the maximum .