![]() |
|
Unique filename - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Unique filename (/thread-7918.html) |
Unique filename - public - 2010-12-01 Hello, In a multi user environment with many different cameras there will be a risk for users trying to upload images to the same album with the same filename. Is there an easy way to modify Zenphoto ensure that filenames are keept unique? Regards, Perry Jönsson Unique filename - sbillard - 2010-12-02 assign each user a unique upload album. Unique filename - public - 2010-12-02 Well, the problem still exist with non-unique filenames. I plan to use Zenphoto with users that have very basic computer skills. When they extract photos from the camera it is done from Windows and images will be named 001, 002, 003 etc. (Yes, this could be solved with education... However, since they are using many different cameras you can no rely on the unique filenames from the camera itself.) Further, I would also like users to collaborate and be able to upload new photos to others albums as well. So, back to my question again. Regars, Perry Unique filename - acrylian - 2010-12-02 It could probably be done with a plugin using filters. That plugin would have to compare all images on the file system with the one you upload and rename it accordingly. The standard filter-zenphoto_seo.php plugin might act as a template for this. Best you take a look at that and read also the article about the plugin system. Unique filename - public - 2010-12-02 OK I will have a look on the plugin. My general idea as a quickfix would be to modify the upload function. If the upload function can perform a SQL query to get a database index, it could then simply ad a index to the filename. (this would require that you disable the possibility to add photos via Windows Explorer). Is there any logic or other issue I have overlooked with such solution? Further - is this a feature/modification that would be suitable for a permanent implementation in future versions of Zenphoto? /Perry Unique filename - acrylian - 2010-12-02 [i]My general idea as a quickfix would be to modify the upload function. If the upload function can perform a SQL query to get a database index, it could then simply ad a index to the filename.[/i] [i](this would require that you disable the possibility to add photos via Windows Explorer).[/i] [i]Further - is this a feature/modification that would be suitable for a permanent implementation in future versions of Zenphoto?[/i] If you would like to start this plugin, best open a ticket and assign that to yourself. You should work with a current nightly build to be save for the next release scheduled in Januaray. Also please read the developer and general contributor guidelines articles on our user guide. |