[Zope] Replace files in a specific directory using pythonscript

Dieter Maurer dieter@handshake.de
Fri, 8 Nov 2002 23:05:57 +0100


Ria Marinussen writes:
 > ...
 > Can anyone provide me with a sample python script that uses (or clues how to
 > use) manage_upload to upload this file to the correct ID?
You know your folder, say "F". You get id and file in your form,
say "id" and "file".

Then, you do:

      ....
      file_to_be_updated= getattr(f,id)
      file_to_be_updated.manage_upload(file)
      return 'updated'


Dieter