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
[Solved] Uploads module doesn't allow 2 files with same name
-
Lostwitheal
- New Member

- Posts: 4
- Joined: Tue Sep 18, 2012 9:18 pm
[Solved] Uploads module doesn't allow 2 files with same name
Last edited by Lostwitheal on Sun Oct 21, 2012 10:25 am, edited 1 time in total.
Re: Uploads module doesn't allow 2 files with same name
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 
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Uploads module doesn't allow 2 files with same name
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..?
Are you trying to upload these same named files from the front or backend..?
-
Lostwitheal
- New Member

- Posts: 4
- Joined: Tue Sep 18, 2012 9:18 pm
Re: Uploads module doesn't allow 2 files with same name
I was testing it from the front end (logged in as a regular website user)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..?
CSS Doctor - I might try that, thanks.


