[Zope] manage_edit or manage_upload help

Vital Lobachevsky tick@ornak.pl
Fri, 04 Apr 2003 12:07:05 +0300


Ravneet Sachar wrote:
> Hi,
>  
> I have created a file object from the OFSP product using 
> manage_addFile. This works great.
>  
> Now I am creating a form to edit the contents of the file. On submitting 
> this form, I want the file data to be updated with what was there in the 
> textarea of the form. Seems simple, and I tried to use manage_edit or 
> manage_upload from my python script.
> I am unsuccessful in doing this and get Attribute Errors.
>  
> I would appreciate it if someone could send some example code to help me 
> update the contents of a file object.

You should use the "update_data" method of File object.