Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatic file-renaming on uploads


Jondab-Ali

Recommended Posts

Greetings,

 

I'd like to be able to automatically rename images and files as they are uploaded via the admin interface of osc.

 

I have managed to implement my own file upload based upon the default image upload script, in order to maintain osc api compliance. I have used this to allow for an mp3 sample player to be integrated into the shop on which I'm working.

 

But the problem is that, as with images, the user of the site may well upload images or mp3 samples that have strange filenames (causing problems with parsing the filenames later on in subsequent scripts). This is why I'd like to automatically rename uploaded files to a standard naming convention.

 

ie.

1.jpg, 2.jpg, 3.jpg, ad infinitum...

1.mp3, 2.mp3, 3.mp3, ad infinitum...

 

My PHP skills are limited, and I don't have much time to finish this particular project. Would anyone care to help me? Perhaps this would be a useful addition to the osc core, since it would eliminate problems with uploaded images not being displayed, etc. Not everyone who uses osc is a techie, after all.

 

Any help would be appreciated. Thanks.

 

Peace,

 

 

Jondab Ali

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...