Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem in duplicate upload images


bashaclick

Recommended Posts

hi all

i have problem in admin contorl

listen :D

 

im crate a new product and inster images the name images 1.jpg

ok

the path images

images/1.jpg

now it's ok

 

i crate a nother product and upload images same name 1.jpg

this same path

images/1.jpg

now i go no old product it display a new images

 

 

plz help me

how can rename image direct in date or time ....

 

 

regard

 

 

:blush:

Edited by bashaclick
Link to comment
Share on other sites

hi all

i have problem in admin contorl

listen :D

 

im crate a new product and inster images the name images 1.jpg

ok

the path images

images/1.jpg

now it's ok

 

i crate a nother product and upload images same name 1.jpg

this same path

images/1.jpg

now i go no old product it display a new images

 

 

plz help me

how can rename image direct in date or time ....

 

 

regard

 

This worked for me: in /catalog/admin/classes/upload.php

function set_filename($filename) {

$this->filename = $filename;

}

with:

function set_filename($filename) {

$file_parts=explode('.',$filename);

$new_filename=time()."_".rand(1000,9999).".".end($file_parts);

$this->filename = $new_filename;

}

 

regards

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...