Page 1 of 1
[Solved] Uploads module doesn't allow 2 files with same name
Posted: Mon Oct 08, 2012 8:34 am
by Lostwitheal
I have the Uploads module installed, and it's working perfectly apart from one detail. I would like to allow all registered users to upload files and expect a fairly large number of uploads. As people tend to not be too original in naming their files, I expect that at some point I will have several people trying to upload files named "img1.png" or "untitled.png" or "a.png", etc.
At this point the Uploads module does not allow uploads of two files with the same name. Is there a way to get around this?
Thanks,
Lostwiteal
Re: Uploads module doesn't allow 2 files with same name
Posted: Mon Oct 08, 2012 1:29 pm
by Jo Morg
Not sure if it will work as I have never attempted to do this, but you could try to handle the uploads event
OnUpload with an UDT that generates an unique ID and attaches it to the file name. That would only work IF the event is pre-save which I'm not sure it is. But it may be worth a try

Re: Uploads module doesn't allow 2 files with same name
Posted: Mon Oct 08, 2012 9:50 pm
by Dr.CSS
I was under the impression that Uploads makes a new folder for every upload using a unique ID for each folder...
Are you trying to upload these same named files from the front or backend..?
Re: Uploads module doesn't allow 2 files with same name
Posted: Wed Oct 10, 2012 12:59 pm
by Lostwitheal
Dr.CSS wrote:I was under the impression that Uploads makes a new folder for every upload using a unique ID for each folder...
Are you trying to upload these same named files from the front or backend..?
I was testing it from the front end (logged in as a regular website user)
CSS Doctor - I might try that, thanks.