• 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.

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