[Zope] LocalFS and adding folders dynamically
Tue, 23 Jul 2002 15:10:03 -0500
Create an external method containing the following code:
from OFS.Folder import Folder
def addLocalFSFolder(self, id):
ob = Folder()
ob.id = id
Call it like so:
<dtml-call "addLocalFSFolder(local, foldername)">
The Source for Data Pros WorldWide.
From: email@example.com [mailto:firstname.lastname@example.org]On Behalf Of Aseem
Sent: Tuesday, July 23, 2002 2:46 AM
Subject: [Zope] LocalFS and adding folders dynamically
I am using a localFS to manage user uploaded files. When a user uploads
a file I basically create a folder for the user using manage_AddFolder
to the localFS object and then call manage_upload to upload the file to
the newly created folder.
The reason I do this is that there doestn seem to be a way to add
folders to the localFS product using its API. The problem is LocalFS
security settings dont have Allow Add Folder property and hence unless I
am manager I cant call manage_AddFolder. I dont want to proxy the
manager role for the containing folder because I dont want users to be
(even if accidentally) add folders to the containing folder.
What options do I have?? Is there any way at all to do it??
Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706
(R) 510 7696011 (M) 510 3014871 (O) 510 5279231
"I saw `cout' being shifted "Hello world" times to the left and
stopped right there!!" -- Steve Gonedes
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -