I want to know the image size in mb but before ulpload do the same. I have:
$errors = array();
$image = $_FILES[\'image\'][\'name\'];
$file_tmp =
Can't you use the function filesize()?
filesize($_FILES['image'])
or
filesize(//enter image url);
I would give you more details but the php.net site is having malware problems
Use php filesize function.You can get the bytes of the file
$imgsize = filesize( '/home/projects/site/1.jpg' );
Before upload you can check like so:
$file_tmp = $_FILES['image']['tmp_name'];
$size = filesize($file_tmp);
But do you realize you are expecting the image to be less than a kilobyte in your code example?
Well the plugin will help you : jQuery-File-Upload