www.fromthevalley.com.au

Check File Size

sub _handleGET {


    #
    # Assign a cgi variable to the CGI object.
    #
    my $cgi = new CGI;

    print $cgi->header();
    my $type = $cgi->param("type");
    my $file = $cgi->param("file");

    $file =~ s/%20/ /g;

    my $base;
    if($type eq 'image'){

        $base = $Util::base_dir."images/";

    }

    # If the file exists and has a size > 500, then return a 1.
    if(-s $base.$file > '500'){
        print "1\n";
    }


}
HOME |  AJAX |  APACHE |  Bizphone |  CSS |  DNS |  General |  Graphics |  HTML |  Hardware |  Javascript |  Linux |  MAC |  MS SQL |  Mail |  Microsoft |  OFFICE 365 |  Perl |  Postgres |  SEO |  Social Media |  VMware |  Windows 10