Hey Zopists: I'm making a little tiny File Upload/Exchange site with Zope, and I've run into a liitle problem. I'd like to keep track of who uploads what, so I'm trying to set a property on each file equivalent to the AUTHENTICATED_USER. So, stealing from the 'Creating Folders' example, I've got this code: <!--#if "REQUEST['id'] in objectIds()"--> <H4>Sorry! That name exists, try again</H4> <!--#else--> <!--#call "manage_addFile(id=REQUEST['id'],title=REQUEST['title'],file=REQUEST['file'])"--> <!--#call "_.getitem(REQUEST['id']).manage_addProperty( 'addedby',REQUEST['AUTHENTICATED_USER'], 'string')"--> <H3>File Added</H3> <!--#/if--> This works fine for adding files, but the manage_addProperty call bombs out if the 'id' has a dot in it. The manage_addFile method handles that fine - apparently it quotes the id sufficently, since it gets added if I comment out the addProperty part. If I set an id that does not contain a dot, everthing works. Any ideas? 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
Oh, that wrapped _really_ ugly. Let me clean it up: <!--#if "REQUEST['id'] in objectIds()"--> <H4>Sorry! That name exists, try again</H4> <!--#else--> <!--#call "manage_addFile(id=REQUEST['id'], title=REQUEST['title'],file=REQUEST['file'])"--> <!--#call "_.getitem(REQUEST['id']).manage_addProperty( 'addedby',REQUEST['AUTHENTICATED_USER'], 'string')"--> <H3>File Added</H3> <!--#/if--> and let me clarify a little: it looks like REQUEST['id'] works fine if it's part of an expression after an equals sign, but not alone? Hmm. Ross
Hey Zopists: I'm making a little tiny File Upload/Exchange site with Zope, and I've run into a liitle problem. I'd like to keep track of who uploads what, so I'm trying to set a property on each file equivalent to the AUTHENTICATED_USER. So, stealing from the 'Creating Folders' example, I've got this code:
-- 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
participants (2)
-
reedstrmļ¼ wallace.ece.rice.edu -
Ross J. Reedstrom