Jondab-Ali Posted February 14, 2004 Share Posted February 14, 2004 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 More sharing options...
♥ecartz Posted February 17, 2004 Share Posted February 17, 2004 You could look at how the File Upload contribution does it. The part with which you would be interested would be in the modified includes/application_top.php file. Hth, Matt Always back up before making changes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.