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.
I would like to be able to stop the treatment of the picture when it is oriented in portrait way instead as landscape.
How is it possible to refuse a portrait image to be uploaded ? More generaly, how to stop the process if the file is not convenient (size, weight, ratio, etc...) ?Reply
You can also do this with a little bit of coding. Instantiate the class first, and then if $foo->uploaded == true, you can read the following variables:
I would like to be able to stop the treatment of the picture when it is oriented in portrait way instead as landscape.
How is it possible to refuse a portrait image to be uploaded ?
More generaly, how to stop the process if the file is not convenient (size, weight, ratio, etc...) ?
You can also do this with a little bit of coding. Instantiate the class first, and then if $foo->uploaded == true, you can read the following variables:
Then, you can call $foo->process() with different parameters, depending on the variables above.
Note that this will not work if open_basedir restrictions are in place.