<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>File objects have a method called 'update_data'
which may be of use. Look in the ZopeBook for details.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jonathan</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=mjakowlew@gmail.com href="mailto:mjakowlew@gmail.com">Mike
Jakowlew</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=zope@zope.org
href="mailto:zope@zope.org">zope@zope.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, December 01, 2005 12:12
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Zope] How to Update files that
are already uploaded</DIV>
<DIV><BR></DIV>Hi all,<BR><BR>I'm trying to update a file thats already been
uploaded. I can't figure out what command to use,
"update_data"/"manage_upload"/"manage_edit". I've settled (so far) on
manage_upload but it doesn't work. I get the error: <BR><BR>Error Type:
AttributeError <BR>Error Value: manage_upload<BR><BR>my
code:<BR>_________________________________________<BR># Takes the filename
from a form searches my ZSQL method for the existence of the file, and then
should update the file. <BR><BR>REQUEST=context.REQUEST<BR>filename =
REQUEST.form.get('file')<BR>filename=filename.split('\\')[-1]<BR><BR>result=container.Show_filename_selected(filename=filename)<BR>if
result:<BR> fname= container.Show_filename_selected
(filename=filename).tuples()[0][3]<BR>
context.manage_upload([filename,REQUEST])<BR> return "File
Exists... UPDATE: " + filename<BR>else:<BR> return "File
Does NOT Exist: " + filename<BR>_________________________________________
<BR><BR>What am I doing wrong? Am I using the wrong command?<BR><BR>Thanks in
advance,<BR>mjakowlew<BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Zope maillist
-
Zope@zope.org<BR>http://mail.zope.org/mailman/listinfo/zope<BR>**
No cross posts or HTML encoding! **<BR>(Related lists -
<BR> http://mail.zope.org/mailman/listinfo/zope-announce<BR> http://mail.zope.org/mailman/listinfo/zope-dev
)<BR></BLOCKQUOTE></BODY></HTML>