class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
$foo = new upload($_FILES['fileToUpload']); $foo->allowed = array('image/jpg','image/png', 'image/gif','image/jpeg'); $foo->forbidden = array('application/*'); $foo->file_new_name_body = $filename; $foo->image_convert = jpg; $foo->image_resize = true; $foo->image_ratio_crop = 'C'; $foo->image_x = 200; $foo->image_y = 200; $foo->Process('../img/users/200/');
Code:
Objective: To enable the user to upload a picture of a particular type.
If the script is "php", change the extension for example "JPG", he downloads.
How to get rid of this? thanks