File exchange area - example?
Hey Zopists: As the start of a more general "Collaborative Work" functionality, I need to throw a quick file exchange area up onto a Zope site. The download part is dead easy (just steal the 5 lines from www.zope.org/Download/Contrib !), but the generic upload is a tiny bit more difficult. I realize all I need is an appropriate front-end form 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... The larger project would end up recreating much of the management functionality of Zope. The problem is the need for a scaleable interface: The full blown Zope management interface is a wonderfully rich tool, and as developers, we keep wanting to add more features, but it's overwhelming for those who need only a limited subset of that functionality. Hmm, this sounds a bit like the "Content Managers/Editors" thread. I see that as one example, the most extreme case of limited functionality. This (file exchange) is another. As a second issue, as far as I can tell, permissions are granted based on Roles. Is it possible to set permissions based on individual Users? One method I could see is creating an individual Role for each user, but that could get unwieldy in the management screens. Ross -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
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
participants (2)
-
Pavlos Christoforou -
Ross J. Reedstrom