Topic: [Fixed] Error when uploading heavy images

// English...

Hello! When I try to upload an image that is bigger than the allowed size (in megabytes, not pixels), it shows to me this error:

Invalid file type, allowed JPG, PNG, GIF and BMP

instead of:

The file is too heavy

// Español...

Hola! Cuando intento subir una imagen de la cual su tamaño (en megabytes, no pixels) es mayor de lo permitido, me enseña este error:

Invalid file type, allowed JPG, PNG, GIF and BMP

en lugar de:

The file is too heavy

Last edited by Xampy5 (2010-08-30 10:23:10)

Thumbs up

Re: [Fixed] Error when uploading heavy images

I fixed it.
Just changed this:

if ($no==true) {
            // Eliminamos la imagen del up/working..
            unlink($handlework);

            $spit = true;
            unset($modo);
            $modo = 1;
            if ($peso==true) {
                $pes_txt = TOO_HEAVY.' ('.$max_mb.'MB max.)';
            }
            if ($peso==true && $invalida==true) {
                $ademas = ' '.ANDTEXT.' ';
                $errormsg = $pes_txt.$ademas;
            } else {
                $errormsg = INVALID_EXT;
            }
            
            
            
            
        } // no!

by this:

if ($no==true) {
            // Eliminamos la imagen del up/working..
            unlink($handlework);

            $spit = true;
            unset($modo);
            $modo = 1;
            if ($peso==true && $invalida==false) {
                $pes_txt = TOO_HEAVY.' ('.$max_mb.'MB max.)';
                $errormsg = $pes_txt;
            }
            elseif ($peso==true && $invalida==true) {
                $pes_txt = TOO_HEAVY.' ('.$max_mb.'MB max.)';
                $ademas = ' '.ANDTEXT.' ';
                $errormsg = $pes_txt.$ademas;
            } else {
                $errormsg = INVALID_EXT;
            }
            
            
            
            
        } // no!

This code is in engine.php file, around line 388~

Thumbs up

Re: [Fixed] Error when uploading heavy images

Thanks!.. I have change the source tongue

PS: I'm working in the bmp issue.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: [Fixed] Error when uploading heavy images

Ok, thanks tongue!

Thumbs up

Re: [Fixed] Error when uploading heavy images

I have solved a problem so.
mod_php--> php-cgi

http://imgh.ru/

Last edited by dzek (2010-09-29 06:47:25)

Thumbs up