Uploading files occurs on ajax. The problem is that if the file is more than 2 mb., Then the class for creating a thumbnail does not work, or rather gives an error like:
Warning: getimagesize(Z:/home/shop/www/public/uploads/002.jpg) [function.getimagesize]: failed to open stream: No such file or directory in Z:\home\shop\www\admin\systems\classes\uploads.class.php on line 18 Warning: Division by zero in Z:\home\shop\www\admin\systems\classes\uploads.class.php on line 84 and this is not the whole list.
I realized that it gives an error, because the file has not yet had time to load, and they already say it, let's process it.
I do this:
move_uploaded_file($value['tmp_name'], $this -> dir . $new_name_file); $new_image = new SimpleImage($this -> dir . $new_name_file); $new_image -> imageresizewidth($thumb_img_resize_width); $new_image -> imagesave($new_image -> image_type, $this -> dir . 'thumb/' . $new_name_file); $new_image -> imageout(); How can I solve this problem?
public/uploadfolder. In the settings of the server php.ini (or somewhere in the ini_set) set the maximum size of the file being downloaded? - Vasily Barbashev