• 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

Old images get replaced by new ones

mimidov

Chevereto Noob
After few months of intensive uploads to my site using your script, some members complain that their images urls are now displaying different photos which have been uploaded by other ppl.

I think the script does not validate the names properly and there is a bug that replaces old images with new ones at certain times.

Please check

thanks
 
Mmmm...

Actually the script checks if the file exists...
PHP:
if (file_exists(DIR_IM.$renombre.'.'.$exten)) {
                if ($conteo>$totalchars) { 
                    // Si el nombre es muy largo, corta
                    $renombra = substr("$renombre", 0, $max_name-4); // 4 -> El remplazo de mas abajo            
                } else { 
                    $renombra = $renombre;    
                }
                // Vamos a darle caracteres aleatorios.            
                $name = $renombra.$ch_1.$ch_2.$ch_1.'.'.$exten;
            } else { 
                $name = $renombre.'.'.$exten;
            }

But it just check this once.. So there is the weird possibility of replacing images. The new major release will replace the current upload method to a new upload.class that doesn't have that issue.. Sadly, you will have to live with this issue for a short time.

Regards.
 
Back
Top