SWFUpload: Where to change filenames? |
[eluser]Leon Stafford[/eluser]
Hi, I have an app using multiple instances of SWFUpload (which is great, btw!). I'm hoping someone with experience can tell me where to change the uploaded file(s)' names. ie to a random string or datestamp. Cheers!
[eluser]pistolPete[/eluser]
Have a look at this thread: http://ellislab.com/forums/viewthread/98622/ If you use the SVN version of CodeIgniter you can use this setting of the upload library to change the filename: Code: $config['file_name'] = ...
[eluser]Leon Stafford[/eluser]
Thanks pistolPete! The SVN version and the config worked a charm! I wasn't getting the right reference back to my SWFUpload calling page's JS function, so changed: Code: function uploadSuccessShop(file, serverData) { to: Code: function uploadSuccessShop(file, serverData) { I think that was needed, otherwise it was just the cache fairies messing with me.... |
Welcome Guest, Not a member yet? Register Sign In |