I created this image upload code. But knowing that certain people can by images of 2000x1000, 5mb I would reduce this to something smaller. And insert into my code, how can I do it?
I created this image upload code. But knowing that certain people can by images of 2000x1000, 5mb I would reduce this to something smaller. And insert into my code, how can I do it?
Take a look at this video: link It talks about resizing images, they get smaller when resized, you can leave them as big as you want and you can also limit the size of the image, so for example:
$tamanhoPermitido = 1024 * 1024;
$tamanho = $_FILES['file']['size'];
if ($tamanho > $tamanhoPermitido) {?>
O tamanho do arquivo enviado é maior que o limite!
<?php }?>
OBS: man, the friend above is trying to help you and this is how you respond?
Quote
@hugocsl .. continuo na mesma, pois pretendo é ajudinha a desenvolver e a explicar um codigo de reducao de tamanho. Voces dão-me respostas tortas e... sem sentido para a minha questão.
So the staff will not even help you.