Topic: Old images get replaced by new ones

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

Thumbs up

Re: Old images get replaced by new ones

Mmmm...

Actually the script checks if the file exists...

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.

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