[Zope] How to Update files that are already uploaded
Mike Jakowlew
mjakowlew at gmail.com
Thu Dec 1 12:12:33 EST 2005
Hi all,
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:
Error Type: AttributeError
Error Value: manage_upload
my code:
_________________________________________
# Takes the filename from a form searches my ZSQL method for the existence
of the file, and then should update the file.
REQUEST=context.REQUEST
filename = REQUEST.form.get('file')
filename=filename.split('\\')[-1]
result=container.Show_filename_selected(filename=filename)
if result:
fname= container.Show_filename_selected
(filename=filename).tuples()[0][3]
context.manage_upload([filename,REQUEST])
return "File Exists... UPDATE: " + filename
else:
return "File Does NOT Exist: " + filename
_________________________________________
What am I doing wrong? Am I using the wrong command?
Thanks in advance,
mjakowlew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20051201/278e7ed3/attachment.htm
More information about the Zope
mailing list