• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

[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 😛

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