On Mon, 22 Feb 1999, Ross J. Reedstrom wrote:
to manage_addFile - I'm just hoping someone has a DTML snippet I can have, to deal with things like: generate a default ID, set the title to the filename uploaded, deal with name collisions (offer to replace, or rename), anything else I haven't thought of yet...
I had a similar need some time ago (but on a smaller scale). I ended up creating a property of type integer in the folder. Every time someone uploaded a file the DTML created a new subfolder with the counter value as the id and subsequently incremented the counter. This ensured that no collisions occured. Each subfolder contained properties such as author, filename, short info, title,last modification time, and plenty other. I would then have a default DTML in the main folder that created a table of all the available documents in the subfolders, together with some info. In terms of DTML programming it is actually simple, but I am not sure whether it will meet your needs. Pavlos