[Zope] change manage_addFile

Dieter Maurer dieter at handshake.de
Wed Dec 20 17:56:16 EST 2006


Kate Legere wrote at 2006-12-20 11:46 -0500:
>I copied the code from manage_addFileFolder
                        ^^^^^^^^^^^^^^^^^^^^

What is that? I do not know of a "FileFolder".

Please be *VERY* careful when you write your messages.

   The better your message, the better can be the answers you get....

> ...
>How would I do that? I've looked through the code in OFS that handles this
>but am not sure how to add the folder as a variable.... (I;ve tried a couple
>of things unsuccessfully)

You would not use "manage_addFile" as the form action
but your own action, say "myFancyAddFileAction".

"myFancyAddFileAction" would use the additional destination variable
(you provide via your "myFancyAddFileForm") to obtain
the real destination (probably by means of "restrictedTraverse")
and then call "manage_addFile" on this destination.


-- 
Dieter


More information about the Zope mailing list