• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

[Fixed] Error when uploading heavy images

Xampy5

Chevereto Noob
// 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:
Code:
Invalid file type, allowed JPG, PNG, GIF and BMP
instead of:
Code:
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:
Code:
Invalid file type, allowed JPG, PNG, GIF and BMP
en lugar de:
Code:
The file is too heavy
 
I fixed it.
Just changed this:
Code:
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:
Code:
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~
 
Thanks!.. I have change the source :p

PS: I'm working in the bmp issue.
 
Back
Top