using php to check file size and block certain sizes code example Example: php get size of file $fileSizeInBytes=filesize("/path/to/myfile.txt");