Reply to Restrict image by file size

Restrict image by file size new!
by Ben, 15 years, 6 months ago
Hi,

Can you please provide an example on how to restrict the upload if it is above a certain size?

I do this after the $handle->uploaded (im not sure if this is correct), however i get an exception thrown:

/upload.class.php(3036): unlink('73278a4a86960ee...')

My code is as follows:
if ($handle->uploaded) {
  $handle->file_max_size = '50';

Best regards, Ben.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important